File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
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 $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
@@ -2547,7 +2547,9 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt)
2547
2547
if (tllen != list_length (qry -> targetList ))
2548
2548
ereport (ERROR ,
2549
2549
(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." )));
2551
2553
2552
2554
qry -> limitOffset = transformLimitClause (pstate , limitOffset ,
2553
2555
"OFFSET" );
You can’t perform that action at this time.
0 commit comments