Re: Use outerPlanState() consistently in executor code

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