Re: 9.5 release notes may need ON CONFLICT DO NOTHING compatibility notice for FDW authors - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: 9.5 release notes may need ON CONFLICT DO NOTHING compatibility notice for FDW authors
Date
Msg-id CANP8+jJpoiHKOwh7p3p6LD0_aea6MbKvuXNSXcJOmoincdw7Lg@mail.gmail.com
Whole thread Raw
In response to 9.5 release notes may need ON CONFLICT DO NOTHING compatibility notice for FDW authors  (Peter Geoghegan <pg@heroku.com>)
Responses Re: 9.5 release notes may need ON CONFLICT DO NOTHING compatibility notice for FDW authors  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On 25 May 2015 at 00:22, Peter Geoghegan <pg@heroku.com> wrote:

There is no support for ON CONFLICT DO UPDATE with postgres_fdw, but
that's really only because an inference specification (or explicitly
named constraint) is always required for DO UPDATE. The deparsing
support actually added will have deparsing add "ON CONFLICT DO
NOTHING" for the SQL generated for execution on foreign servers if the
original statement had that exact, unadorned ON CONFLICT clause. As
things stand, every other possible ON CONFLICT clause will throw an
error in some way before the FDW is consulted at all, so FDW authors
need not concern themselves with those other cases (unless perhaps we
allow ON CONFLICT DO UPDATE to not require an inference specification
in a last minute behavioral tweak, as suggested by Simon Riggs, making
ON CONFLICT DO UPDATE support by foreign data wrappers a possibility
that must be considered).

My earlier summary was that the support for multiple constraints has been poorly thought through. This is an example of the breakage I have been complaining about when we are forced to specify the constraint (conflict-target).

This is not just related to FDWs and should not be fixed solely for FDWs. This was already an open item for me in 9.5, now even more so.

My comments do not come at the last minute, what Peter means is that we should make a change now in response to the concerns I have previously raised.

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Stefan Kaltenbrunner
Date:
Subject: Re: problems on Solaris
Next
From: Kouhei Kaigai
Date:
Subject: Construction of Plan-node by CSP (RE: Custom/Foreign-Join-APIs)