diff options
Diffstat (limited to 'src/backend/executor/execProcnode.c')
-rw-r--r-- | src/backend/executor/execProcnode.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c index 0a3539204a0..c4fbf9d3996 100644 --- a/src/backend/executor/execProcnode.c +++ b/src/backend/executor/execProcnode.c @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execProcnode.c,v 1.60 2007/01/05 22:19:27 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execProcnode.c,v 1.61 2007/02/27 01:11:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -278,26 +278,11 @@ ExecInitNode(Plan *node, EState *estate, int eflags) SubPlanState *sstate; Assert(IsA(subplan, SubPlan)); - sstate = ExecInitExprInitPlan(subplan, result); - ExecInitSubPlan(sstate, estate, eflags); + sstate = ExecInitSubPlan(subplan, result); subps = lappend(subps, sstate); } result->initPlan = subps; - /* - * Initialize any subPlans present in this node. These were found by - * ExecInitExpr during initialization of the PlanState. Note we must do - * this after initializing initPlans, in case their arguments contain - * subPlans (is that actually possible? perhaps not). - */ - foreach(l, result->subPlan) - { - SubPlanState *sstate = (SubPlanState *) lfirst(l); - - Assert(IsA(sstate, SubPlanState)); - ExecInitSubPlan(sstate, estate, eflags); - } - /* Set up instrumentation for this node if requested */ if (estate->es_instrument) result->instrument = InstrAlloc(1); @@ -610,20 +595,12 @@ ExecCountSlotsNode(Plan *node) void ExecEndNode(PlanState *node) { - ListCell *subp; - /* * do nothing when we get to the end of a leaf on tree. */ if (node == NULL) return; - /* Clean up initPlans and subPlans */ - foreach(subp, node->initPlan) - ExecEndSubPlan((SubPlanState *) lfirst(subp)); - foreach(subp, node->subPlan) - ExecEndSubPlan((SubPlanState *) lfirst(subp)); - if (node->chgParam != NULL) { bms_free(node->chgParam); |