aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtsuro Fujita <efujita@postgresql.org>2019-04-26 18:10:05 +0900
committerEtsuro Fujita <efujita@postgresql.org>2019-04-26 18:10:05 +0900
commit90fca7a35aa7ac421f814bdfdf1fee7c30fa82f0 (patch)
treeef1ca164b7344b5fa00f31c7b4ef4f7a05017433
parenta9ce839a31375a6c04189222706ae6b2abe96919 (diff)
downloadpostgresql-90fca7a35aa7ac421f814bdfdf1fee7c30fa82f0.tar.gz
postgresql-90fca7a35aa7ac421f814bdfdf1fee7c30fa82f0.zip
Add FDW documentation notes about insert and update tuple routing and COPY.
Author: Laurenz Albe and Etsuro Fujita Reviewed-by: Laurenz Albe and Amit Langote Backpatch-through: 11 where support for that by FDWs was added Discussion: https://postgr.es/m/bf36a0288e8f31b4f2f40952e225bf892dc1ffc5.camel@cybertec.at
-rw-r--r--doc/src/sgml/fdwhandler.sgml15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml
index 2c07a866372..eb92253e387 100644
--- a/doc/src/sgml/fdwhandler.sgml
+++ b/doc/src/sgml/fdwhandler.sgml
@@ -594,6 +594,14 @@ ExecForeignInsert(EState *estate,
</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 that allow the FDW to support that.
+ </para>
+
+ <para>
<programlisting>
TupleTableSlot *
ExecForeignUpdate(EState *estate,
@@ -752,6 +760,13 @@ BeginForeignInsert(ModifyTableState *mtstate,
</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
EndForeignInsert(EState *estate,