Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XxIl0-0006Or-FK for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Dec 2014 17:02:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XxIkz-0001m0-Up for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Dec 2014 17:02:58 +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 1XxIkx-0001lr-NF for pgsql-hackers@postgresql.org; Sat, 06 Dec 2014 17:02:55 +0000 Received: from 173-164-140-181-sfba.hfc.comcastbusiness.net ([173.164.140.181] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XxIkq-0000Iy-2Z for pgsql-hackers@postgresql.org; Sat, 06 Dec 2014 17:02:54 +0000 Received: by fetter.org (Postfix, from userid 500) id 7192363FBA; Sat, 6 Dec 2014 09:02:16 -0800 (PST) Date: Sat, 6 Dec 2014 09:02:16 -0800 From: David Fetter To: Etsuro Fujita Cc: Ashutosh Bapat , Kyotaro HORIGUCHI , Heikki Linnakangas , Noah Misch , Shigeru Hanada , pgsql-hackers Subject: Re: inherit support for foreign tables Message-ID: <20141206170216.GA14211@fetter.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <547FD69A.8090308@lab.ntt.co.jp> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -0.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 On Thu, Dec 04, 2014 at 12:35:54PM +0900, Etsuro Fujita wrote: > (2014/12/03 19:35), Ashutosh Bapat wrote: > >On Tue, Dec 2, 2014 at 8:29 AM, Etsuro Fujita > >> wrote: > > >This is not exactly extension of non-inheritance case. non-inheritance > >case doesn't show two remote SQLs under the same plan node. May be you > >can rename the label Remote SQL as Remote UPDATE/INSERT/DELETE (or > >something to that effect) for the DML command and the Foreign plan node > >should be renamed to Foreign access node or something to indicate that > >it does both the scan as well as DML. I am not keen about the actual > >terminology, but I think a reader of plan shouldn't get confused. > > > >We can leave this for committer's judgement. > > Thanks for the proposal! I think that would be a good idea. 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? Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers