Re: Use outerPlanState() consistently in executor code

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Use outerPlanState() consistently in executor code
Дата
Msg-id 37038.1430438682@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Use outerPlanState() consistently in executor code  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Use outerPlanState() consistently in executor code  (Qingqing Zhou <zhouqq.postgres@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: initdb -S and tablespaces
Следующее
От: Kohei KaiGai
Дата:
Сообщение: Re: One question about security label command