diff options
Diffstat (limited to 'src/backend/executor')
-rw-r--r-- | src/backend/executor/nodeAgg.c | 5 | ||||
-rw-r--r-- | src/backend/executor/nodeSubplan.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 603df5ed1c4..f2499cb4e5e 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -45,7 +45,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.105 2003/05/30 20:23:10 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.106 2003/06/06 15:04:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1179,6 +1179,9 @@ ExecInitAgg(Agg *node, EState *estate) Datum textInitVal; int i; + /* Planner should have assigned aggregate to correct level */ + Assert(aggref->agglevelsup == 0); + /* Look for a previous duplicate aggregate */ for (i = 0; i <= aggno; i++) { diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c index 5d9bdc84241..ff5d03faf8c 100644 --- a/src/backend/executor/nodeSubplan.c +++ b/src/backend/executor/nodeSubplan.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.45 2003/04/08 23:20:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.46 2003/06/06 15:04:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -240,7 +240,9 @@ ExecScanSubPlan(SubPlanState *node, oldcontext = MemoryContextSwitchTo(node->sub_estate->es_query_cxt); /* - * Set Params of this plan from parent plan correlation Vars + * Set Params of this plan from parent plan correlation values. + * (Any calculation we have to do is done in the parent econtext, + * since the Param values don't need to have per-query lifetime.) */ pvar = node->args; foreach(lst, subplan->parParam) |