summaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeLimit.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/nodeLimit.c
parent8eace46d34ab6ac0d887aa4d3504bc4222c2e448 (diff)
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/nodeLimit.c')
-rw-r--r--src/backend/executor/nodeLimit.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/backend/executor/nodeLimit.c b/src/backend/executor/nodeLimit.c
index 885931e5947..aaec1322189 100644
--- a/src/backend/executor/nodeLimit.c
+++ b/src/backend/executor/nodeLimit.c
@@ -239,8 +239,7 @@ recompute_limits(LimitState *node)
{
val = ExecEvalExprSwitchContext(node->limitOffset,
econtext,
- &isNull,
- NULL);
+ &isNull);
/* Interpret NULL offset as no offset */
if (isNull)
node->offset = 0;
@@ -263,8 +262,7 @@ recompute_limits(LimitState *node)
{
val = ExecEvalExprSwitchContext(node->limitCount,
econtext,
- &isNull,
- NULL);
+ &isNull);
/* Interpret NULL count as no count (LIMIT ALL) */
if (isNull)
{
@@ -346,18 +344,11 @@ pass_down_bound(LimitState *node, PlanState *child_node)
else if (IsA(child_node, ResultState))
{
/*
- * An extra consideration here is that if the Result is projecting a
- * targetlist that contains any SRFs, we can't assume that every input
- * tuple generates an output tuple, so a Sort underneath might need to
- * return more than N tuples to satisfy LIMIT N. So we cannot use
- * bounded sort.
- *
* If Result supported qual checking, we'd have to punt on seeing a
- * qual, too. Note that having a resconstantqual is not a
- * showstopper: if that fails we're not getting any rows at all.
+ * qual. Note that having a resconstantqual is not a showstopper: if
+ * that fails we're not getting any rows at all.
*/
- if (outerPlanState(child_node) &&
- !expression_returns_set((Node *) child_node->plan->targetlist))
+ if (outerPlanState(child_node))
pass_down_bound(node, outerPlanState(child_node));
}
}