1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Replace generic 'Illegal use of aggregates' error message with one that

shows the specific ungrouped variable being complained of.  Perhaps this
will reduce user confusion...
This commit is contained in:
Tom Lane
1999-12-09 05:58:56 +00:00
parent d65a27f950
commit f7f41c7c8c
6 changed files with 122 additions and 78 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.47 1999/11/15 02:00:07 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.48 1999/12/09 05:58:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -100,10 +100,7 @@ query_planner(Query *root,
* Note we do NOT do this for subplans in WHERE; it's legal
* there because WHERE is evaluated pre-GROUP.
*/
if (check_subplans_for_ungrouped_vars((Node *) tlist,
root->groupClause,
tlist))
elog(ERROR, "Sub-SELECT must use only GROUPed attributes from outer SELECT");
check_subplans_for_ungrouped_vars((Node *) tlist, root, tlist);
}
}