Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X1nWC-0003g6-LK for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Jul 2014 02:10:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X1nWC-0003t8-45 for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Jul 2014 02:10:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X1nWA-0003rF-Em for pgsql-hackers@postgresql.org; Tue, 01 Jul 2014 02:09:58 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X1nW2-00072X-0y for pgsql-hackers@postgresql.org; Tue, 01 Jul 2014 02:09:56 +0000 Received: from mfs6.rdh.ecl.ntt.co.jp (mfs6.rdh.ecl.ntt.co.jp [129.60.39.149]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id s6129kES028505; Tue, 1 Jul 2014 11:09:46 +0900 Received: from mfs6.rdh.ecl.ntt.co.jp (localhost.localdomain [127.0.0.1]) by mfs6.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 88E33E014B; Tue, 1 Jul 2014 11:09:46 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by mfs6.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 7D0B9E0148; Tue, 1 Jul 2014 11:09:46 +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 s6129krs020894; Tue, 1 Jul 2014 11:09:46 +0900 Message-ID: <53B21861.1000706@lab.ntt.co.jp> Date: Tue, 01 Jul 2014 11:09:37 +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> <53B1405F.7040203@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 20:17), Ashutosh Bapat wrote: > On Mon, Jun 30, 2014 at 4:17 PM, Etsuro Fujita > > wrote: > (2014/06/30 17:47), Ashutosh Bapat wrote: > 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(). > In that case, we can call build_relation_tlist() for foreign tables. Do you mean build_physical_tlist()? Yeah, we can call build_physical_tlist() (and do that in some cases), but if we call the function, it would generate a tlist that contains all Vars in the relation, not only those Vars actually needed by the query (ie, Vars in reltargetlist), and thus it would take more cycles to compute attr_used from the tlist than from reltargetlist. That' what I wanted to say. Thanks, Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers