From 1a105cefbd4769a1ef857f94a71faed6cb76717b Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Fri, 13 Feb 1998 03:26:53 +0000 Subject: Support for subselects. ExecReScan for nodeAgg, nodeHash, nodeHashjoin, nodeNestloop and nodeResult. Fixed ExecReScan for nodeMaterial. Get rid of #ifdef INDEXSCAN_PATCH. Get rid of ExecMarkPos and ExecRestrPos in nodeNestloop. --- src/backend/executor/nodeAgg.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/backend/executor/nodeAgg.c') diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 444a5bc9db6..9778e365a58 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -676,3 +676,21 @@ aggGetAttr(TupleTableSlot *slot, return result; } + +void +ExecReScanAgg(Agg *node, ExprContext *exprCtxt, Plan *parent) +{ + AggState *aggstate = node->aggstate; + ExprContext *econtext = aggstate->csstate.cstate.cs_ExprContext; + + aggstate->agg_done = FALSE; + MemSet(econtext->ecxt_values, 0, sizeof(Datum) * length(node->aggs)); + MemSet(econtext->ecxt_nulls, 0, length(node->aggs)); + /* + * if chgParam of subnode is not null then plan + * will be re-scanned by first ExecProcNode. + */ + if (((Plan*) node)->lefttree->chgParam == NULL) + ExecReScan (((Plan*) node)->lefttree, exprCtxt, (Plan *) node); + +} -- cgit v1.2.3