aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeSubplan.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2017-01-19 14:12:38 -0800
committerAndres Freund <andres@anarazel.de>2017-01-19 14:40:41 -0800
commitea15e18677fc2eff3135023e27f69ed8821554ed (patch)
treeb6a3d56b7603b96a5841681f0121171844a1c41c /src/backend/executor/nodeSubplan.c
parent8eace46d34ab6ac0d887aa4d3504bc4222c2e448 (diff)
downloadpostgresql-ea15e18677fc2eff3135023e27f69ed8821554ed.tar.gz
postgresql-ea15e18677fc2eff3135023e27f69ed8821554ed.zip
Remove obsoleted code relating to targetlist SRF evaluation.
Since 69f4b9c plain expression evaluation (and thus normal projection) can't return sets of tuples anymore. Thus remove code dealing with that possibility. This will require adjustments in external code using ExecEvalExpr()/ExecProject() - that should neither be hard nor very common. Author: Andres Freund and Tom Lane Discussion: https://postgr.es/m/20160822214023.aaxz5l4igypowyri@alap3.anarazel.de
Diffstat (limited to 'src/backend/executor/nodeSubplan.c')
-rw-r--r--src/backend/executor/nodeSubplan.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c
index 68edcd4567b..f8a2cd446a2 100644
--- a/src/backend/executor/nodeSubplan.c
+++ b/src/backend/executor/nodeSubplan.c
@@ -41,12 +41,10 @@
static Datum ExecSubPlan(SubPlanState *node,
ExprContext *econtext,
- bool *isNull,
- ExprDoneCond *isDone);
+ bool *isNull);
static Datum ExecAlternativeSubPlan(AlternativeSubPlanState *node,
ExprContext *econtext,
- bool *isNull,
- ExprDoneCond *isDone);
+ bool *isNull);
static Datum ExecHashSubPlan(SubPlanState *node,
ExprContext *econtext,
bool *isNull);
@@ -69,15 +67,12 @@ static bool slotNoNulls(TupleTableSlot *slot);
static Datum
ExecSubPlan(SubPlanState *node,
ExprContext *econtext,
- bool *isNull,
- ExprDoneCond *isDone)
+ bool *isNull)
{
SubPlan *subplan = (SubPlan *) node->xprstate.expr;
- /* Set default values for result flags: non-null, not a set result */
+ /* Set non-null as default */
*isNull = false;
- if (isDone)
- *isDone = ExprSingleResult;
/* Sanity checks */
if (subplan->subLinkType == CTE_SUBLINK)
@@ -128,7 +123,7 @@ ExecHashSubPlan(SubPlanState *node,
* have to set the econtext to use (hack alert!).
*/
node->projLeft->pi_exprContext = econtext;
- slot = ExecProject(node->projLeft, NULL);
+ slot = ExecProject(node->projLeft);
/*
* Note: because we are typically called in a per-tuple context, we have
@@ -285,8 +280,7 @@ ExecScanSubPlan(SubPlanState *node,
prm->value = ExecEvalExprSwitchContext((ExprState *) lfirst(pvar),
econtext,
- &(prm->isnull),
- NULL);
+ &(prm->isnull));
planstate->chgParam = bms_add_member(planstate->chgParam, paramid);
}
@@ -403,7 +397,7 @@ ExecScanSubPlan(SubPlanState *node,
}
rowresult = ExecEvalExprSwitchContext(node->testexpr, econtext,
- &rownull, NULL);
+ &rownull);
if (subLinkType == ANY_SUBLINK)
{
@@ -572,7 +566,7 @@ buildSubPlanHash(SubPlanState *node, ExprContext *econtext)
&(prmdata->isnull));
col++;
}
- slot = ExecProject(node->projRight, NULL);
+ slot = ExecProject(node->projRight);
/*
* If result contains any nulls, store separately or not at all.
@@ -985,8 +979,7 @@ ExecSetParamPlan(SubPlanState *node, ExprContext *econtext)
prm->value = ExecEvalExprSwitchContext((ExprState *) lfirst(pvar),
econtext,
- &(prm->isnull),
- NULL);
+ &(prm->isnull));
planstate->chgParam = bms_add_member(planstate->chgParam, paramid);
}
@@ -1222,8 +1215,7 @@ ExecInitAlternativeSubPlan(AlternativeSubPlan *asplan, PlanState *parent)
static Datum
ExecAlternativeSubPlan(AlternativeSubPlanState *node,
ExprContext *econtext,
- bool *isNull,
- ExprDoneCond *isDone)
+ bool *isNull)
{
/* Just pass control to the active subplan */
SubPlanState *activesp = (SubPlanState *) list_nth(node->subplans,
@@ -1231,8 +1223,5 @@ ExecAlternativeSubPlan(AlternativeSubPlanState *node,
Assert(IsA(activesp, SubPlanState));
- return ExecSubPlan(activesp,
- econtext,
- isNull,
- isDone);
+ return ExecSubPlan(activesp, econtext, isNull);
}