diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml
index 0e2cd3628c..70d89393d9 100644
--- a/doc/src/sgml/fdwhandler.sgml
+++ b/doc/src/sgml/fdwhandler.sgml
@@ -1076,44 +1076,41 @@ ExecForeignTruncate(List *rels,
bool restart_seqs);
- Truncate a set of foreign tables specified in rels.
- This function is called when is executed
- on foreign tables. rels is the list of
- Relation data structure that indicates
- a foreign table to truncate.
+ Truncate foreign tables. This function is called when
+ is executed on a foreign table.
+ rels is a list of Relation
+ data structures of foreign tables to truncate.
- behavior defines how foreign tables should
- be truncated, using as possible values DROP_RESTRICT,
- which means that RESTRICT option is specified,
- and DROP_CASCADE, which means that
- CASCADE option is specified, in
- TRUNCATE command.
+ behavior is either DROP_RESTRICT
+ or DROP_CASCADE indicating that the
+ RESTRICT or CASCADE option was
+ requested in the original TRUNCATE command,
+ respectively.
- restart_seqs is set to true
- if RESTART IDENTITY option is specified in
- TRUNCATE command. It is false
- if CONTINUE IDENTITY option is specified.
+ If restart_seqs is true,
+ the original TRUNCATE command requested the
+ RESTART IDENTITY behavior, otherwise the
+ CONTINUE IDENTITY behavior was requested.
- Note that information about ONLY options specified
+ Note that the ONLY options specified
in the original TRUNCATE command is not passed to
- ExecForeignTruncate. This is the same behavior as
- for the callback functions for SELECT,
+ ExecForeignTruncate. This behavior is similar to
+ the callback functions of SELECT,
UPDATE and DELETE on
a foreign table.
- TRUNCATE invokes
- ExecForeignTruncate once per foreign server
- that foreign tables to truncate belong to. This means that all foreign
- tables included in rels must belong to the same
- server.
+ ExecForeignTruncate is invoked once per
+ foreign server for which foreign tables are to be truncated.
+ This means that all foreign tables included in rels
+ must belong to the same server.
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index b0806c1274..839126c4ef 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -459,11 +459,17 @@ OPTIONS (ADD password_required 'false');
This option controls whether postgres_fdw allows
- foreign tables to be truncated using TRUNCATE
+ foreign tables to be truncated using the TRUNCATE
command. It can be specified for a foreign table or a foreign server.
A table-level option overrides a server-level option.
The default is true.
+
+
+ Of course, if the remote table is not in fact truncatable, an error
+ would occur anyway. Use of this option primarily allows the error to
+ be thrown locally without querying the remote server.
+
diff --git a/doc/src/sgml/ref/truncate.sgml b/doc/src/sgml/ref/truncate.sgml
index acf3633be4..9af42dd008 100644
--- a/doc/src/sgml/ref/truncate.sgml
+++ b/doc/src/sgml/ref/truncate.sgml
@@ -173,7 +173,7 @@ TRUNCATE [ TABLE ] [ ONLY ] name [
TRUNCATE can be used for foreign tables if
- the foreign data wrapper supports, for instance,
+ supported by the foreign data wrapper,
see .