Commit e2fe3270 authored by Bruce Momjian's avatar Bruce Momjian

Improve error wording of ORDER BY in UNION that uses new expressions in

ORDER BY.
parent ad429fe3
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.355 2007/01/09 02:14:13 tgl Exp $ * $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.356 2007/01/11 18:44:53 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -2547,7 +2547,7 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt) ...@@ -2547,7 +2547,7 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt)
if (tllen != list_length(qry->targetList)) if (tllen != list_length(qry->targetList))
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("ORDER BY on a UNION/INTERSECT/EXCEPT result must be on one of the result columns"))); errmsg("ORDER BY on a UNION/INTERSECT/EXCEPT result must match existing result columns")));
qry->limitOffset = transformLimitClause(pstate, limitOffset, qry->limitOffset = transformLimitClause(pstate, limitOffset,
"OFFSET"); "OFFSET");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment