Re: pgsql: Allow insert and update tuple routing and COPY forforeign table - Mailing list pgsql-committers

From Laurenz Albe
Subject Re: pgsql: Allow insert and update tuple routing and COPY forforeign table
Date
Msg-id 90573804dcad67f73552898ebfe9b399875a48bd.camel@cybertec.at
Whole thread Raw
In response to Re: pgsql: Allow insert and update tuple routing and COPY for foreign table  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-committers
On Wed, 2019-04-24 at 14:25 +0100, Simon Riggs wrote:
> On Wed, 24 Apr 2019 at 12:55, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp> wrote:
>  
> > > My point is that this should not be necessary.
> > 
> > In my opinion, I think this is necessary...
> 
> Could we decide by looking at what FDWs are known to exist?
> I hope we are trying to avoid breakage in the smallest number of FDWs.

A good idea.  I don't volunteer to go through the list, but I had a look
at Multicorn, which is a FDW framework used by many FDWs, and it seems
to rely on multicornBeginForeignModify being called before
multicornExecForeignInsert (the former sets up a MulticornModifyState
used by the latter).

https://github.com/Kozea/Multicorn/blob/master/src/multicorn.c

Multicorn obviously hasn't got the message yet that the API has
changed in an incompatible fashion, so I'd argue that every
Multicorn FDW with write support is currently broken.


As Andres has argued above, it is too late to do anything more about
it than to document this and warn FDW authors as good as we can.

Yours,
Laurenz Albe




pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Unify error messages
Next
From: Tom Lane
Date:
Subject: pgsql: Fix some minor postmaster-state-machine issues.