Re: inherit support for foreign tables - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: inherit support for foreign tables
Date
Msg-id CAFjFpRcFdb1Xr5FkBjxWudnV0DuLr6i3Ue-wcNhU8d0h9=E2ag@mail.gmail.com
Whole thread Raw
In response to Re: inherit support for foreign tables  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Responses Re: inherit support for foreign tables  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-hackers
I checked that it's reporting the right tableoid now.

BTW, why aren't you using the tlist passed to this function? I guess create_scan_plan() passes tlist after processing it, so that should be used rather than rel->reltargetlist.


On Mon, Jun 30, 2014 at 12:22 PM, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp> wrote:
(2014/06/24 16:30), Etsuro Fujita wrote:
(2014/06/23 18:35), Ashutosh Bapat wrote:

Selecting tableoid on parent causes an error, "ERROR:  cannot extract
system attribute from virtual tuple". The foreign table has an OID which
can be reported as tableoid for the rows coming from that foreign table.
Do we want to do that?

No.  I think it's a bug.  I'll fix it.

Done.  I think this is because create_foreignscan_plan() makes reference to attr_needed, which isn't computed for inheritance children.  To aboid this, I've modified create_foreignscan_plan() to see reltargetlist and baserestrictinfo, instead of attr_needed.  Please find attached an updated version of the patch.


Sorry for the delay.

Best regards,
Etsuro Fujita



--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: How about a proper TEMPORARY TABLESPACE?
Next
From: Abhijit Menon-Sen
Date:
Subject: Re: replicating DROP commands across servers