summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/planner.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-12-09 05:58:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-12-09 05:58:56 +0000
commitf7f41c7c8c34edec610240405569ed6e0954e03e (patch)
tree39c0737d7aceed48126cf0f20da82fd4c2442b5b /src/backend/optimizer/plan/planner.c
parentd65a27f9509e8cbd0a0d8a58597bd096c2a22207 (diff)
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...
Diffstat (limited to 'src/backend/optimizer/plan/planner.c')
-rw-r--r--src/backend/optimizer/plan/planner.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 295d722b6a5..278ef356f12 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -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);
}
}