Re: subselect, order by and left join

Поиск
Список
Период
Сортировка
От Morten K. Poulsen
Тема Re: subselect, order by and left join
Дата
Msg-id 20041108145837.GC8216@mopo.i.tv2.dk
обсуждение исходный текст
Ответ на Re: subselect, order by and left join  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-general
On Mon, Nov 08, 2004 at 04:54:40AM -0800, Stephan Szabo wrote:
> > If I have a subselect with an ORDER BY, and I LEFT JOIN the result with the
> > other table, is the order maintained? Or is PostgreSQL free to return the
> > rows in any order, after the join?
>
> AFAIK, you have no guarantees as to the output order unless you have another
> order by.  The join may destroy the ordering, so even if you get the ordering
> you want right now, you shouldn't rely on it.

OK. Thanks for the reply.

Morten

--
Morten K. Poulsen <morten-postgresql@afdelingp.dk>
http://www.afdelingp.dk/

В списке pgsql-general по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: subselect, order by and left join
Следующее
От: Pallav Kalva
Дата:
Сообщение: Installing pgbench