FDW-documentation.patch
text/x-patch
Filename: FDW-documentation.patch
Type: text/x-patch
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| doc/src/sgml/fdwhandler.sgml | 15 | 0 |
| doc/src/sgml/release-11.sgml | 3 | 0 |
diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml
index 7b758bdf09..c2d26ba3c1 100644
--- a/doc/src/sgml/fdwhandler.sgml
+++ b/doc/src/sgml/fdwhandler.sgml
@@ -587,6 +587,14 @@ ExecForeignInsert(EState *estate,
with an error message.
</para>
+ <para>
+ Note that this function is also called when inserting routed tuples into
+ a foreign-table partition or executing <command>COPY FROM</command> on
+ a foreign table, in which case it is called in a different way than it
+ is in the <command>INSERT</command> case. See the callback functions
+ described below to support that.
+ </para>
+
<para>
<programlisting>
TupleTableSlot *
@@ -743,6 +751,13 @@ BeginForeignInsert(ModifyTableState *mtstate,
<literal>NULL</literal>, no action is taken for the initialization.
</para>
+ <para>
+ Note that if the FDW does not support routable foreign-table partitions
+ and/or executing <command>COPY FROM</command> on foreign tables, this
+ function or <function>ExecForeignInsert</function> subsequently called
+ must throw error as needed.
+ </para>
+
<para>
<programlisting>
void
diff --git a/doc/src/sgml/release-11.sgml b/doc/src/sgml/release-11.sgml
index 14e2726f0c..7994e5d269 100644
--- a/doc/src/sgml/release-11.sgml
+++ b/doc/src/sgml/release-11.sgml
@@ -2594,6 +2594,9 @@ Branch: REL9_3_STABLE [84261eb10] 2018-10-19 17:02:26 -0400
<para>
This is supported by <filename>postgres_fdw</filename>
foreign tables.
+ Since the <function>ExecForeignInsert</function> callback function
+ is called for this in a different way than it used to be, foreign
+ data wrappers must be modified to cope with the change.
</para>
</listitem>