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. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers