1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +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/planner.c,v 1.71 1999/11/15 02:00:08 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.72 1999/12/09 05:58:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -344,10 +344,9 @@ union_planner(Query *parse)
/* Expand SubLinks to SubPlans */
parse->havingQual = SS_process_sublinks(parse->havingQual);
/* Check for ungrouped variables passed to subplans */
if (check_subplans_for_ungrouped_vars(parse->havingQual,
parse->groupClause,
parse->targetList))
elog(ERROR, "Sub-SELECT must use only GROUPed attributes from outer SELECT");
check_subplans_for_ungrouped_vars(parse->havingQual,
parse,
parse->targetList);
}
}