diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/fdwhandler.sgml | 29 | ||||
-rw-r--r-- | doc/src/sgml/postgres-fdw.sgml | 7 |
2 files changed, 20 insertions, 16 deletions
diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml index 9f9274ce55f..e08441ec8bc 100644 --- a/doc/src/sgml/fdwhandler.sgml +++ b/doc/src/sgml/fdwhandler.sgml @@ -1071,28 +1071,16 @@ EndDirectModify(ForeignScanState *node); <para> <programlisting> void -ExecForeignTruncate(List *rels, List *rels_extra, - DropBehavior behavior, bool restart_seqs); +ExecForeignTruncate(List *rels, + DropBehavior behavior, + bool restart_seqs); </programlisting> Truncate a set of foreign tables specified in <literal>rels</literal>. This function is called when <xref linkend="sql-truncate"/> is executed on foreign tables. <literal>rels</literal> is the list of <structname>Relation</structname> data structure that indicates - a foreign table to truncate. <literal>rels_extra</literal> the list of - <literal>int</literal> value, which delivers extra information about - a foreign table to truncate. Possible values are - <literal>TRUNCATE_REL_CONTEXT_NORMAL</literal>, which means that - the foreign table is specified WITHOUT <literal>ONLY</literal> clause - in <command>TRUNCATE</command>, - <literal>TRUNCATE_REL_CONTEXT_ONLY</literal>, which means that - the foreign table is specified WITH <literal>ONLY</literal> clause, - and <literal>TRUNCATE_REL_CONTEXT_CASCADING</literal>, - which means that the foreign table is not specified explicitly, - but will be truncated due to dependency (for example, partition table). - There is one-to-one mapping between <literal>rels</literal> and - <literal>rels_extra</literal>. The number of entries is the same - between the two lists. + a foreign table to truncate. </para> <para> @@ -1112,6 +1100,15 @@ ExecForeignTruncate(List *rels, List *rels_extra, </para> <para> + Note that the <literal>ONLY</literal> options specified + in the original <command>TRUNCATE</command> command are not passed to + <function>ExecForeignTruncate</function>. This behavior is similar to + the callback functions of <command>SELECT</command>, + <command>UPDATE</command> and <command>DELETE</command> on + a foreign table. + </para> + + <para> <command>TRUNCATE</command> invokes <function>ExecForeignTruncate</function> once per foreign server that foreign tables to truncate belong to. This means that all foreign diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml index 5320accf6f4..b0806c1274e 100644 --- a/doc/src/sgml/postgres-fdw.sgml +++ b/doc/src/sgml/postgres-fdw.sgml @@ -70,6 +70,13 @@ </para> <para> + Note that the <literal>ONLY</literal> option specified in + <command>SELECT</command>, <command>UPDATE</command>, + <command>DELETE</command> or <command>TRUNCATE</command> + has no effect when accessing or modifying the remote table. + </para> + + <para> Note that <filename>postgres_fdw</filename> currently lacks support for <command>INSERT</command> statements with an <literal>ON CONFLICT DO UPDATE</literal> clause. However, the <literal>ON CONFLICT DO NOTHING</literal> |