Re: pgsql: Allow insert and update tuple routing and COPY for foreign table

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Allow insert and update tuple routing and COPY for foreign table
Date: 2019-04-25 14:29:08
Message-ID: fe47dddfbcb87c9a4a7605cc4f36b89eaef1e7b3.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, 2019-04-25 at 22:17 +0900, Etsuro Fujita wrote:
> > The documentation of ExecForeignInsert should mention something like:
> >
> > ExecForeignInsert is called for INSERT statements as well
> > as for COPY FROM and tuples that are inserted into a foreign table
> > because it is a partition of a partitioned table.
> >
> > In the case of a normal INSERT, BeginForeignModify will be called
> > before ExecForeignInsert to perform any necessary setup.
> > In the other cases, this setup has to happen in BeginForeignInsert.
>
> These seem a bit redundant to me [...]
>
> OK, how about something like the attached? I reworded this a bit, though.

I like your patch better than my wording.

Thanks for the effort!

Yours,
Laurenz Albe

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2019-04-25 14:35:21 pgsql: Fix tablespace inheritance for partitioned rels
Previous Message Etsuro Fujita 2019-04-25 13:17:12 Re: pgsql: Allow insert and update tuple routing and COPY for foreign table

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-04-25 14:35:46 Re: pg_dump is broken for partition tablespaces
Previous Message Sergei Kornilov 2019-04-25 14:20:17 Re: BUG #15781: subselect on foreign table (postgres_fdw) can crash (segfault)