From: Tom Lane Date: Mon, 8 Jan 2001 21:30:37 +0000 (+0000) Subject: Document that we don't support ORDER BY with general expressions on X-Git-Tag: REL7_1_BETA3~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6334ef86a732ae4330dc1c4c65adab8059f864f3;p=postgresql Document that we don't support ORDER BY with general expressions on the output of UNION/INTERSECT/EXCEPT. --- diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml index 9dbc495812..a34771571e 100644 --- a/doc/src/sgml/ref/select.sgml +++ b/doc/src/sgml/ref/select.sgml @@ -1,5 +1,5 @@ @@ -616,7 +616,12 @@ SELECT title, date_prod + 1 AS newlen FROM films ORDER BY newlen; SELECT name FROM distributors ORDER BY code; - + A limitation of this feature is that an ORDER BY clause applying to the + result of a UNION, INTERSECT, or EXCEPT query may only specify an output + column name or number, not an expression. + + + Note that if an ORDER BY item is a simple name that matches both a result column name and an input column name, ORDER BY will interpret it as the result column name. This is the opposite of the choice that