Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XxnrU-0003o2-LQ for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Dec 2014 02:15:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XxnrU-0007Ly-0l for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Dec 2014 02:15:44 +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 1XxnrR-0007La-Mh for pgsql-hackers@postgresql.org; Mon, 08 Dec 2014 02:15:41 +0000 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XxnrN-00023f-Gi for pgsql-hackers@postgresql.org; Mon, 08 Dec 2014 02:15:39 +0000 Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id sB82FRmD007451; Mon, 8 Dec 2014 11:15:27 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id E01C65F58F; Mon, 8 Dec 2014 11:15:26 +0900 (JST) Received: from imail3.m.ecl.ntt.co.jp (imail3.m.ecl.ntt.co.jp [129.60.5.248]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id D11E25F587; Mon, 8 Dec 2014 11:15:26 +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 sB82FQ8V021491; Mon, 8 Dec 2014 11:15:26 +0900 Message-ID: <548509AA.2090305@lab.ntt.co.jp> Date: Mon, 08 Dec 2014 11:15:06 +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: David Fetter CC: Ashutosh Bapat , Kyotaro HORIGUCHI , Heikki Linnakangas , Noah Misch , Shigeru Hanada , pgsql-hackers Subject: Re: inherit support for foreign tables References: <545CB4A2.1030303@lab.ntt.co.jp> <54645499.7050709@lab.ntt.co.jp> <5476FB4B.9060705@lab.ntt.co.jp> <547D2B1D.1080107@lab.ntt.co.jp> <547FD69A.8090308@lab.ntt.co.jp> <20141206170216.GA14211@fetter.org> In-Reply-To: <20141206170216.GA14211@fetter.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Pg-Spam-Score: -2.6 (--) 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/12/07 2:02), David Fetter wrote: > On Thu, Dec 04, 2014 at 12:35:54PM +0900, Etsuro Fujita wrote: >> But I think >> there would be another idea. An example will be shown below. We show the >> update commands below the ModifyTable node, not above the corresponding >> ForeignScan nodes, so maybe less confusing. If there are no objections of >> you and others, I'll update the patch this way. >> >> postgres=# explain verbose update parent set a = a * 2 where a = 5; >> QUERY PLAN >> ------------------------------------------------------------------------------------- >> Update on public.parent (cost=0.00..280.77 rows=25 width=10) >> On public.ft1 >> Remote SQL: UPDATE public.mytable_1 SET a = $2 WHERE ctid = $1 > ^^^^^^^^^^ > It occurs to me that the command generated by the FDW might well not > be SQL at all, as is the case with file_fdw and anything else that > talks to a NoSQL engine. > > Would it be reasonable to call this "Remote command" or something > similarly generic? Yeah, but I'd like to propose that this line is shown by the FDW API (ie, ExplainForeignModify) as in non-inherited update cases, so that the FDW developer can choose the right name. As for "On public.ft1", I'd like to propose that the FDW API also show that by calling a function for that introduced into the PG core (Would it be better to use "For" rather than "On"?). Sorry, my explanation was not enough. 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