| От | Tom Lane |
|---|---|
| Тема | Re: Problems with UNION ALL and ORDER BY |
| Дата | |
| Msg-id | 10984.1091464511@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Problems with UNION ALL and ORDER BY (Kaloyan Iliev Iliev <news1@faith.digsys.bg>) |
| Ответы |
Re: Problems with UNION ALL and ORDER BY
|
| Список | pgsql-sql |
Kaloyan Iliev Iliev <news1@faith.digsys.bg> writes:
> I have the following problem:
> select
> .....
> from
> ....
> where
> ....
> UNION ALL
> select
> ...
> from
> ....
> where
> ....
> ORDER BY field1
> But the the order by doesn't work properly. It returns the rows of the
> first query ordered and then appends the rows of the second query
> ordered.
Pray tell, what Postgres release are you using?
AFAICT this will result in an overall sort in all PG releases since 7.0.
I don't have anything older to test...
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера