Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux