On Wed, Jun 10, 2015 at 9:15 PM, Bruce Momjian <br...@momjian.us> wrote:
> I am ready to make suggested adjustments

I attach a compatibility note that is clearly needed; adding this is
an open item of mine for 9.5. This concerns foreign data wrappers and
UPSERT.

-- 
Peter Geoghegan
diff --git a/doc/src/sgml/release-9.5.sgml b/doc/src/sgml/release-9.5.sgml
index 5b0d109..9e857bc 100644
--- a/doc/src/sgml/release-9.5.sgml
+++ b/doc/src/sgml/release-9.5.sgml
@@ -125,6 +125,34 @@
      </para>
     </listitem>
 
+    <listitem>
+     <para>
+      Foreign data wrappers that support updating foreign tables must
+      consider the possible presence of an <literal>ON CONFLICT DO
+      NOTHING</> clause on <command>INSERT</> statements (Peter
+      Geoghegan)
+     </para>
+
+     <para>
+      When an <literal>ON CONFLICT DO NOTHING</> clause is present,
+      foreign data wrappers should either perform a
+      <productname>PostgreSQL</productname>-analogous action on the
+      foreign table, or reject the query outright.
+     </para>
+
+     <para>
+      <productname>PostgreSQL</productname> currently lacks support
+      for unique index inference against foreign tables;  the
+      optimizer will always reject <command>INSERT</> statements that
+      attempt <literal>ON CONFLICT</> inference on the basis of the
+      system having no information about <quote>foreign unique
+      indexes</>.  Since, in general, an inference clause is mandatory
+      for <literal>ON CONFLICT DO UPDATE</>, the <literal>DO UPDATE</>
+      variant is in effect not currently supported with foreign
+      tables.
+     </para>
+    </listitem>
+
    </itemizedlist>
 
   </sect2>
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to