| От | Tom Lane |
|---|---|
| Тема | Re: BUG #1335: Wrong sort result in union queries |
| Дата | |
| Msg-id | 8560.1101916469@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: BUG #1335: Wrong sort result in union queries (Stephan Szabo <sszabo@megazone.bigpanda.com>) |
| Список | pgsql-bugs |
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> Union isn't a tool which gives you that ability. Union All is closer, but
> still doesn't guarantee an order.
The current implementation of UNION ALL will in fact act that way (just
append the individual query results together), but if for some reason we
decide to change it later, we'll be within the spec to do so. (I can't
imagine a reason to change it though...)
> This one is also okay. The order by in one wing does not control the
> output of the union. I believe supporting it is an extension in any case
> (at least SQL92 seems to make it illegal)
Yes. SQL92 believes strongly that row order is not significant, except
at the top level output of a query with ORDER BY ...
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера