File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -587,6 +587,14 @@ ExecForeignInsert(EState *estate,
587
587
with an error message.
588
588
</para>
589
589
590
+ <para>
591
+ Note that this function is also called when inserting routed tuples into
592
+ a foreign-table partition or executing <command>COPY FROM</command> on
593
+ a foreign table, in which case it is called in a different way than it
594
+ is in the <command>INSERT</command> case. See the callback functions
595
+ described below that allow the FDW to support that.
596
+ </para>
597
+
590
598
<para>
591
599
<programlisting>
592
600
TupleTableSlot *
@@ -743,6 +751,13 @@ BeginForeignInsert(ModifyTableState *mtstate,
743
751
<literal>NULL</literal>, no action is taken for the initialization.
744
752
</para>
745
753
754
+ <para>
755
+ Note that if the FDW does not support routable foreign-table partitions
756
+ and/or executing <command>COPY FROM</command> on foreign tables, this
757
+ function or <function>ExecForeignInsert</function> subsequently called
758
+ must throw error as needed.
759
+ </para>
760
+
746
761
<para>
747
762
<programlisting>
748
763
void
Original file line number Diff line number Diff line change @@ -2594,6 +2594,9 @@ Branch: REL9_3_STABLE [84261eb10] 2018-10-19 17:02:26 -0400
2594
2594
<para>
2595
2595
This is supported by <filename>postgres_fdw</filename>
2596
2596
foreign tables.
2597
+ Since the <function>ExecForeignInsert</function> callback function
2598
+ is called for this in a different way than it used to be,
2599
+ foreign data wrappers must be modified to cope with this change.
2597
2600
</para>
2598
2601
</listitem>
2599
2602
You can’t perform that action at this time.
0 commit comments