diff options
author | David Rowley <drowley@postgresql.org> | 2021-05-14 12:26:11 +1200 |
---|---|---|
committer | David Rowley <drowley@postgresql.org> | 2021-05-14 12:26:11 +1200 |
commit | 6cb93beddd33d00e0ce2ee55edfa32cd2a935394 (patch) | |
tree | 5b4e2ba658a237a3b7a5a371e8c46b9ae916ce1f | |
parent | fbe9b80610fe17ed27ee318bdc5ba06ed86b1a71 (diff) | |
download | postgresql-6cb93beddd33d00e0ce2ee55edfa32cd2a935394.tar.gz postgresql-6cb93beddd33d00e0ce2ee55edfa32cd2a935394.zip |
Convert misleading while loop into an if condition
This seems to be leftover from ea15e1867 and from when we used to evaluate
SRFs at each node.
Since there is an unconditional "return" at the end of the loop body, only
1 loop is ever possible, so we can just change this into an if condition.
There is no actual bug being fixed here so no back-patch. It seems fine to
just fix this anomaly in master only.
Author: Greg Nancarrow
Discussion: https://postgr.es/m/CAJcOf-d7T1q0az-D8evWXnsuBZjigT04WkV5hCAOEJQZRWy28w@mail.gmail.com
-rw-r--r-- | src/backend/executor/nodeResult.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/executor/nodeResult.c b/src/backend/executor/nodeResult.c index 1762b87c999..0946af0a549 100644 --- a/src/backend/executor/nodeResult.c +++ b/src/backend/executor/nodeResult.c @@ -103,7 +103,7 @@ ExecResult(PlanState *pstate) * called, OR that we failed the constant qual check. Either way, now we * are through. */ - while (!node->rs_done) + if (!node->rs_done) { outerPlan = outerPlanState(node); |