Re: Use outerPlanState() consistently in executor code - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Use outerPlanState() consistently in executor code
Date
Msg-id 37038.1430438682@sss.pgh.pa.us
Whole thread Raw
In response to Re: Use outerPlanState() consistently in executor code  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Use outerPlanState() consistently in executor code  (Qingqing Zhou <zhouqq.postgres@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Yeah, that seems fine.  Anyone want to object to this?

This hunk:

@@ -299,6 +301,7 @@ ExecReScanSort(SortState *node)               return;
       /* must drop pointer to sort result tuple */
+       outerPlan = outerPlanState(node);       ExecClearTuple(node->ss.ps.ps_ResultTupleSlot);
       /*

seems to have involved throwing darts at the source code to decide where
to insert the variable initialization; certainly putting a totally
unrelated operation between a comment and the line it describes is not
an improvement to code clarity in my book.

I think I'd have done many of these as

+       PlanState       *outerPlan = outerPlanState(node);

rather than finding assorted random places to initialize the variables.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: initdb -S and tablespaces
Next
From: Kohei KaiGai
Date:
Subject: Re: One question about security label command