diff options
author | Etsuro Fujita <efujita@postgresql.org> | 2019-04-26 18:10:06 +0900 |
---|---|---|
committer | Etsuro Fujita <efujita@postgresql.org> | 2019-04-26 18:10:06 +0900 |
commit | 53f48a2abb7b13a866d62e68e6ecfb11b637b0b1 (patch) | |
tree | 1edac1c194226f394642b34f953380e095ee85ee | |
parent | b1f570b57cccba9275649815be009a3947b48130 (diff) | |
download | postgresql-53f48a2abb7b13a866d62e68e6ecfb11b637b0b1.tar.gz postgresql-53f48a2abb7b13a866d62e68e6ecfb11b637b0b1.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.sgml | 15 | ||||
-rw-r--r-- | doc/src/sgml/release-11.sgml | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml index 7b758bdf09b..f719b06664b 100644 --- a/doc/src/sgml/fdwhandler.sgml +++ b/doc/src/sgml/fdwhandler.sgml @@ -588,6 +588,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, @@ -744,6 +752,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, diff --git a/doc/src/sgml/release-11.sgml b/doc/src/sgml/release-11.sgml index 14e2726f0c1..5c9f41a17aa 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 this change. </para> </listitem> |