Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 90fca7a

Browse files
author
Etsuro Fujita
committed
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/[email protected]
1 parent a9ce839 commit 90fca7a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/src/sgml/fdwhandler.sgml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,14 @@ ExecForeignInsert(EState *estate,
593593
with an error message.
594594
</para>
595595

596+
<para>
597+
Note that this function is also called when inserting routed tuples into
598+
a foreign-table partition or executing <command>COPY FROM</command> on
599+
a foreign table, in which case it is called in a different way than it
600+
is in the <command>INSERT</command> case. See the callback functions
601+
described below that allow the FDW to support that.
602+
</para>
603+
596604
<para>
597605
<programlisting>
598606
TupleTableSlot *
@@ -751,6 +759,13 @@ BeginForeignInsert(ModifyTableState *mtstate,
751759
<literal>NULL</literal>, no action is taken for the initialization.
752760
</para>
753761

762+
<para>
763+
Note that if the FDW does not support routable foreign-table partitions
764+
and/or executing <command>COPY FROM</command> on foreign tables, this
765+
function or <function>ExecForeignInsert</function> subsequently called
766+
must throw error as needed.
767+
</para>
768+
754769
<para>
755770
<programlisting>
756771
void

0 commit comments

Comments
 (0)