Re: Identity projection

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Identity projection
Дата
Msg-id 20033.1360345007@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Identity projection  (Amit Kapila <amit.kapila@huawei.com>)
Ответы Re: Identity projection  (Amit kapila <amit.kapila@huawei.com>)
Список pgsql-hackers
Amit Kapila <amit.kapila@huawei.com> writes:
> On Friday, February 08, 2013 12:00 AM Tom Lane wrote:
> As per my understanding, currently in code wherever Result node can be
> avoided, 
> it calls function is_projection_capable_plan(), so we can even enhance
> is_projection_capable_plan()
> so that it can also verify the expressions of tlists. But for this we need
> to change at all places 
> from where is_projection_capable_plan() is called.

Hm.  Really there's a whole dance that typically goes on, which is like
               if (!is_projection_capable_plan(result_plan))               {                   result_plan = (Plan *)
make_result(root,                                                     sub_tlist,
             NULL,                                                      result_plan);               }
else              {                   /*                    * Otherwise, just replace the subplan's flat tlist with
              * the desired tlist.                    */                   result_plan->targetlist = sub_tlist;
     }
 

Perhaps we could encapsulate this whole sequence into a function called
say assign_targetlist_to_plan(), which would have the responsibility to
decide whether a Result node needs to be inserted.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Time for an autoconf update
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Considering Gerrit for CFs