If we are going to change that portion of the code, we may as well go a bit
forward and allow any expressions to be fetched from a foreign server
(obviously, if that server is capable of doing so). It will help, when we
come to aggregate push-down or whole query push-down (whenever that
happens). So, instead of attr_needed, which restricts only the attributes
to be fetched, why not to targetlist itself?

On Mon, Jun 30, 2014 at 7:18 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:

> Etsuro Fujita <fujita.ets...@lab.ntt.co.jp> writes:
> > Done.  I think this is because create_foreignscan_plan() makes reference
> > to attr_needed, which isn't computed for inheritance children.
> I wonder whether it isn't time to change that.  It was coded like that
> originally only because calculating the values would've been a waste of
> cycles at the time.  But this is at least the third place where it'd be
> useful to have attr_needed for child rels.
>                         regards, tom lane

Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Reply via email to