Re: Identity projection - Mailing list pgsql-hackers

From Amit kapila
Subject Re: Identity projection
Date
Msg-id 6C0B27F7206C9E4CA54AE035729E9C38420CD261@szxeml558-mbs.china.huawei.com
Whole thread Raw
In response to Re: Identity projection  (Amit kapila <amit.kapila@huawei.com>)
Responses Re: Identity projection  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Saturday, February 09, 2013 6:56 AM Amit kapila wrote:
>Friday, February 08, 2013 11:06 PM Tom Lane wrote:
> >Amit Kapila <amit(dot)kapila(at)huawei(dot)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,

>> Hm.  Really there's a whole dance that typically goes on, which is like

>>                if (!is_projection_capable_plan(result_plan))
>>                ....

>> 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.

> if (!is_projection_capable_plan(result_plan) && compare_tlist_exprs(sub_tlist, result_plan->targetlist) )

Sorry, the check I suggested in last mail should be as below:

if (!is_projection_capable_plan(result_plan) && !compare_tlist_exprs(sub_tlist, result_plan->targetlist) )


With Regards,
Amit Kapila.


pgsql-hackers by date:

Previous
From: Amit kapila
Date:
Subject: Re: Identity projection
Next
From: Tom Lane
Date:
Subject: Re: Identity projection