Re: Initialization of ResultTupleSlot in AppendNode

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Initialization of ResultTupleSlot in AppendNode
Дата
Msg-id
14030.1316127238@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Initialization of ResultTupleSlot in AppendNode Amit Kapila <amit.kapila@huawei.com>
Re: Initialization of ResultTupleSlot in AppendNode Tom Lane <tgl@sss.pgh.pa.us>
Re: Initialization of ResultTupleSlot in AppendNode Amit Kapila <amit.kapila@huawei.com>
Re: Initialization of ResultTupleSlot in AppendNode Amit Kapila <amit.kapila@huawei.com>
Amit Kapila  writes:
> I observed that during initialization of planstate for Append Node, we
> allocate ResulttupleSlot, however it is used only to send NULL slot indicate
> no more tuples. 

> Is it right or there is any other purpose of it?

That also holds the plan's output tuple descriptor.  If you tried to
remove it, I think the ExecAssignResultTypeFromTL call would crash.
And if you removed *that*, upper nodes would get unhappy, cf
ExecGetResultType.

The use as an end-of-scan signal seems a bit vestigial, since we
could just as well return NULL, but it doesn't really cost enough
to be worth changing ...
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Josh Kupershmidt
Дата:
Сообщение: Re: psql setenv command
От: Andrew Dunstan
Дата:
Сообщение: Re: psql setenv command
FAQ