Skip to content

Commit 6cb93be

Browse files
committed
Convert misleading while loop into an if condition
This seems to be leftover from ea15e18 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
1 parent fbe9b80 commit 6cb93be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/executor/nodeResult.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ ExecResult(PlanState *pstate)
103103
* called, OR that we failed the constant qual check. Either way, now we
104104
* are through.
105105
*/
106-
while (!node->rs_done)
106+
if (!node->rs_done)
107107
{
108108
outerPlan = outerPlanState(node);
109109

0 commit comments

Comments
 (0)