From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: Shigeru Hanada <shigeru.hanada@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: inherit support for foreign tables
Date: Mon, 30 Jun 2014 19:47:59 +0900
Message-ID: <53B1405F.7040203@lab.ntt.co.jp> (raw)
In-Reply-To: <CAFjFpRcFdb1Xr5FkBjxWudnV0DuLr6i3Ue-wcNhU8d0h9=E2ag@mail.gmail.com>
References: <53393E18.3080901@lab.ntt.co.jp>
<533C01C7.6030809@lab.ntt.co.jp>
<53706FB6.6000403@lab.ntt.co.jp>
<20140620.170406.123403564.horiguchi.kyotaro@lab.ntt.co.jp>
<CAFjFpRcG03b3UZSXTKmro+72qYTdBfxoWCaEMgZBxY1QKyJrbQ@mail.gmail.com>
<53A92924.90702@lab.ntt.co.jp>
<53B10914.2010504@lab.ntt.co.jp>
<CAFjFpRcFdb1Xr5FkBjxWudnV0DuLr6i3Ue-wcNhU8d0h9=E2ag@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
(2014/06/30 17:47), Ashutosh Bapat wrote:
> I checked that it's reporting the right tableoid now.
Thank you for the check.
> 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.
I think that that would be maybe OK, but I think that it would not be
efficient to use the list to compute attrs_used, because the tlist would
have more information than rel->reltargetlist in cases where the tlist
is build through build_physical_tlist().
Thanks,
Best regards,
Etsuro Fujita
>
> On Mon, Jun 30, 2014 at 12:22 PM, Etsuro Fujita
> <fujita.etsuro@lab.ntt.co.jp <mailto: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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: fujita.etsuro@lab.ntt.co.jp, ashutosh.bapat@enterprisedb.com, horiguchi.kyotaro@lab.ntt.co.jp, shigeru.hanada@gmail.com
Subject: Re: inherit support for foreign tables
In-Reply-To: <53B1405F.7040203@lab.ntt.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox