diff options
author | Andres Freund <andres@anarazel.de> | 2017-01-19 14:12:38 -0800 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2017-01-19 14:40:41 -0800 |
commit | ea15e18677fc2eff3135023e27f69ed8821554ed (patch) | |
tree | b6a3d56b7603b96a5841681f0121171844a1c41c /src/backend/executor/execScan.c | |
parent | 8eace46d34ab6ac0d887aa4d3504bc4222c2e448 (diff) | |
download | postgresql-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/execScan.c')
-rw-r--r-- | src/backend/executor/execScan.c | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/src/backend/executor/execScan.c b/src/backend/executor/execScan.c index f97db9c2112..65196795d70 100644 --- a/src/backend/executor/execScan.c +++ b/src/backend/executor/execScan.c @@ -125,8 +125,6 @@ ExecScan(ScanState *node, ExprContext *econtext; List *qual; ProjectionInfo *projInfo; - ExprDoneCond isDone; - TupleTableSlot *resultSlot; /* * Fetch data from node @@ -146,24 +144,8 @@ ExecScan(ScanState *node, } /* - * Check to see if we're still projecting out tuples from a previous scan - * tuple (because there is a function-returning-set in the projection - * expressions). If so, try to project another one. - */ - if (node->ps.ps_TupFromTlist) - { - Assert(projInfo); /* can't get here if not projecting */ - resultSlot = ExecProject(projInfo, &isDone); - if (isDone == ExprMultipleResult) - return resultSlot; - /* Done with that source tuple... */ - node->ps.ps_TupFromTlist = false; - } - - /* * Reset per-tuple memory context to free any expression evaluation - * storage allocated in the previous tuple cycle. Note this can't happen - * until we're done projecting out tuples from a scan tuple. + * storage allocated in the previous tuple cycle. */ ResetExprContext(econtext); @@ -214,15 +196,9 @@ ExecScan(ScanState *node, { /* * Form a projection tuple, store it in the result tuple slot - * and return it --- unless we find we can project no tuples - * from this scan tuple, in which case continue scan. + * and return it. */ - resultSlot = ExecProject(projInfo, &isDone); - if (isDone != ExprEndResult) - { - node->ps.ps_TupFromTlist = (isDone == ExprMultipleResult); - return resultSlot; - } + return ExecProject(projInfo); } else { @@ -352,9 +328,6 @@ ExecScanReScan(ScanState *node) { EState *estate = node->ps.state; - /* Stop projecting any tuples from SRFs in the targetlist */ - node->ps.ps_TupFromTlist = false; - /* Rescan EvalPlanQual tuple if we're inside an EvalPlanQual recheck */ if (estate->es_epqScanDone != NULL) { |