Re: [BUGS] BUG #1335: Wrong sort result in union queries

2004-12-01 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> 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

Re: [BUGS] BUG #1335: Wrong sort result in union queries

2004-12-01 Thread Stephan Szabo
On Wed, 1 Dec 2004, PostgreSQL Bugs List wrote: > Query: > select 2 union select 1 > > Result: > 1 > 2 > > Why? I think the result must be like this: > 2 > 1 If you don't specify an order by (at the top level) the output has no defined order by SQL, so both orders are valid. > Why PostgreSQL so

Re: [BUGS] BUG #1335: Wrong sort result in union queries

2004-12-01 Thread simon
PostgreSQL Bugs List <[EMAIL PROTECTED]> wrote on 01.12.2004, 13:09:23: > > The following bug has been logged online: > > Bug reference: 1335 > Logged by: snaky > > Email address: [EMAIL PROTECTED] > > PostgreSQL version: 8.0 Beta > > Operating system: Windows 2003/XP >