Re: Clarify the ordering guarantees in combining queries (or lack thereof)

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Clarify the ordering guarantees in combining queries (or lack thereof)
Дата
Msg-id CAKFQuwZLpXqOs5JhtyLkEhv6Y6TAUK-aJuMOG9v1-zatgrZq5Q@mail.gmail.com
обсуждение исходный текст
Ответ на Clarify the ordering guarantees in combining queries (or lack thereof)  (Shay Rojansky <roji@roji.org>)
Ответы Re: Clarify the ordering guarantees in combining queries (or lack thereof)  (Shay Rojansky <roji@roji.org>)
Список pgsql-docs
On Wed, Jul 13, 2022 at 5:08 PM Shay Rojansky <roji@roji.org> wrote:
Greetings.

I was trying to understand what - if any - are the guarantees with regards to ordering for combining queries (UNION/UNION ALL/...). From this message[1], it seems that UNION ALL does preserve the ordering of the operand queries, whereas UNION does not (presumably neither do INTERSECT, INTERSECT ALL, EXCEPT and EXCEPT ALL).

The documentation[2] makes no mention of this, I'd suggest adding a note clarifying this.


Since the documentation doesn't make a guarantee there is none.  If you want ordered output use ORDER BY.

David J.

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

Предыдущее
От: Shay Rojansky
Дата:
Сообщение: Clarify the ordering guarantees in combining queries (or lack thereof)
Следующее
От: "ideriha.takeshi@fujitsu.com"
Дата:
Сообщение: RE: No documentation exists about ecpg ORACLE comptaible mode