From: Bruce Momjian Date: Fri, 12 Jan 2007 19:23:38 +0000 (+0000) Subject: Update ORDER BY UNION function/exprssion wording (again). X-Git-Tag: REL8_3_BETA1~1525 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6b054c0f5740d08f66380c5a684688d3e28ece9;p=postgresql Update ORDER BY UNION function/exprssion wording (again). --- diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index d4f8379115..ab262d870a 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.357 2007/01/11 20:04:50 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.358 2007/01/12 19:23:38 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -2547,7 +2547,9 @@ transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt) if (tllen != list_length(qry->targetList)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("A UNION/INTERSECT/EXCEPT ORDER BY cannot use expressions or functions, only result column names"))); + errmsg("invalid UNION/INTERSECT/EXCEPT ORDER BY clause"), + errdetail("Only result column names can be used, not expressions or functions."), + errhint("Add the expression/function to every SELECT, or place the query in a FROM clause."))); qry->limitOffset = transformLimitClause(pstate, limitOffset, "OFFSET");