Re: inherit support for foreign tables

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: David Fetter <david(at)fetter(dot)org>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: inherit support for foreign tables
Date: 2014-12-08 02:15:06
Message-ID: 548509AA.2090305@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2014-12-08 02:30:23 Re: Compression of full-page-writes
Previous Message Dilip kumar 2014-12-08 02:03:49 Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]