Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X1Z8W-0008GM-2B for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Jun 2014 10:48:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X1Z8V-00036d-EH for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Jun 2014 10:48:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X1Z8T-00036T-Ne for pgsql-hackers@postgresql.org; Mon, 30 Jun 2014 10:48:33 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X1Z8P-0006Mg-To for pgsql-hackers@postgresql.org; Mon, 30 Jun 2014 10:48:32 +0000 Received: from mfs5.rdh.ecl.ntt.co.jp (mfs5.rdh.ecl.ntt.co.jp [129.60.39.144]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s5UAmPN0002010; Mon, 30 Jun 2014 19:48:25 +0900 Received: from mfs5.rdh.ecl.ntt.co.jp (localhost.localdomain [127.0.0.1]) by mfs5.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 85A5CE0130; Mon, 30 Jun 2014 19:48:25 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by mfs5.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 79580E012F; Mon, 30 Jun 2014 19:48:25 +0900 (JST) Received: from [129.60.241.75] ([129.60.241.75]) by imail3.m.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s5UAmPhj015257; Mon, 30 Jun 2014 19:48:25 +0900 Message-ID: <53B1405F.7040203@lab.ntt.co.jp> Date: Mon, 30 Jun 2014 19:47:59 +0900 From: Etsuro Fujita User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Ashutosh Bapat CC: Kyotaro HORIGUCHI , Shigeru Hanada , pgsql-hackers Subject: Re: inherit support for foreign tables 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> <53A92924.90702@lab.ntt.co.jp> <53B10914.2010504@lab.ntt.co.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org (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 > > 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