aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeNestloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/nodeNestloop.c')
-rw-r--r--src/backend/executor/nodeNestloop.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/backend/executor/nodeNestloop.c b/src/backend/executor/nodeNestloop.c
index 9b4f8cc4320..9ae9863226c 100644
--- a/src/backend/executor/nodeNestloop.c
+++ b/src/backend/executor/nodeNestloop.c
@@ -286,15 +286,6 @@ ExecInitNestLoop(NestLoop *node, EState *estate, int eflags)
ExecAssignExprContext(estate, &nlstate->js.ps);
/*
- * initialize child expressions
- */
- nlstate->js.ps.qual =
- ExecInitQual(node->join.plan.qual, (PlanState *) nlstate);
- nlstate->js.jointype = node->join.jointype;
- nlstate->js.joinqual =
- ExecInitQual(node->join.joinqual, (PlanState *) nlstate);
-
- /*
* initialize child nodes
*
* If we have no parameters to pass into the inner rel from the outer,
@@ -311,9 +302,19 @@ ExecInitNestLoop(NestLoop *node, EState *estate, int eflags)
innerPlanState(nlstate) = ExecInitNode(innerPlan(node), estate, eflags);
/*
- * tuple table initialization
+ * Initialize result slot, type and projection.
*/
- ExecInitResultTupleSlot(estate, &nlstate->js.ps);
+ ExecInitResultTupleSlotTL(estate, &nlstate->js.ps);
+ ExecAssignProjectionInfo(&nlstate->js.ps, NULL);
+
+ /*
+ * initialize child expressions
+ */
+ nlstate->js.ps.qual =
+ ExecInitQual(node->join.plan.qual, (PlanState *) nlstate);
+ nlstate->js.jointype = node->join.jointype;
+ nlstate->js.joinqual =
+ ExecInitQual(node->join.joinqual, (PlanState *) nlstate);
/*
* detect whether we need only consider the first matching inner tuple
@@ -339,12 +340,6 @@ ExecInitNestLoop(NestLoop *node, EState *estate, int eflags)
}
/*
- * initialize tuple type and projection info
- */
- ExecAssignResultTypeFromTL(&nlstate->js.ps);
- ExecAssignProjectionInfo(&nlstate->js.ps, NULL);
-
- /*
* finally, wipe the current outer tuple clean.
*/
nlstate->nl_NeedNewOuter = true;