Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e6b054c

Browse files
committed
Update ORDER BY UNION function/exprssion wording (again).
1 parent d832354 commit e6b054c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/parser/analyze.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.357 2007/01/11 20:04:50 momjian Exp $
9+
* $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.358 2007/01/12 19:23:38 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -2547,7 +2547,9 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt)
25472547
if (tllen != list_length(qry->targetList))
25482548
ereport(ERROR,
25492549
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2550-
errmsg("A UNION/INTERSECT/EXCEPT ORDER BY cannot use expressions or functions, only result column names")));
2550+
errmsg("invalid UNION/INTERSECT/EXCEPT ORDER BY clause"),
2551+
errdetail("Only result column names can be used, not expressions or functions."),
2552+
errhint("Add the expression/function to every SELECT, or place the query in a FROM clause.")));
25512553

25522554
qry->limitOffset = transformLimitClause(pstate, limitOffset,
25532555
"OFFSET");

0 commit comments

Comments
 (0)