Re: UNION and ORDER BY ... IS NULL ASC - Mailing list pgsql-sql

From Tom Lane
Subject Re: UNION and ORDER BY ... IS NULL ASC
Date
Msg-id 11805.1049516260@sss.pgh.pa.us
Whole thread Raw
In response to Re: UNION and ORDER BY ... IS NULL ASC  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
Josh Berkus <josh@agliodbs.com> writes:
>> ERROR:  ORDER BY on a UNION/INTERSECT/EXCEPT result must be on one of 
>> the result columns

> I do believe that this is per the SQL spec; UNIONs may only be sorted on the 
> output columns.

Right.  We extend the SQL spec for ORDER BY on simple selects, but we
have not gotten around to doing so for ORDER BY on set-operation
results.  You can only sort by unadorned output columns.

Patches to improve this are welcome ;-)
        regards, tom lane



pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: UNION and ORDER BY ... IS NULL ASC
Next
From: "CIC mail"
Date:
Subject: unscribe