git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9ce839)
Add FDW documentation notes about insert and update tuple routing and COPY.
2019年4月26日 09:10:05 +0000 (18:10 +0900)
2019年4月26日 09:10:05 +0000 (18:10 +0900)
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


diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml
index 2c07a866372c9ef629edec7d374f165bfcd541b6..eb92253e38792969ce82f4ecca28a8735c4d62a5 100644 (file)
--- a/doc/src/sgml/fdwhandler.sgml
+++ b/doc/src/sgml/fdwhandler.sgml
@@ -593,6 +593,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 that allow the FDW to support that.
+ </para>
+
<para>
<programlisting>
TupleTableSlot *
@@ -751,6 +759,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
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /