Re: Howto sort the result of UNION (without modifying its type)?

Поиск
Список
Период
Сортировка
От Clemens Eisserer
Тема Re: Howto sort the result of UNION (without modifying its type)?
Дата
Msg-id BANLkTinBXpmWwafrHmTnPutkgD9VJZAPYA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Howto sort the result of UNION (without modifying its type)?  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-general
Hi Robert,


> does this work for you?
>        select u.id from (your unions) as u order by u.id

Unfourtunatly not, it converts my union-results from INTEGER to RECORD.
However, it seems to be possible to order the unions directly:
> result1 UNION result2 ORDER BY u.id

Hmm, the query plan looks really insane for this ... wonder how it
will perform when the tables will not be mostly empty ;)

Thanks, Clemens

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

Предыдущее
От: quickinfo
Дата:
Сообщение: searchable database
Следующее
От: Carlos Mennens
Дата:
Сообщение: Re: Rename or Re-Create Constraints?