Document update in alter_foreign_data_wrapper.sgml
Hi,
ISTM the document in alter_foreign_data_wrapper.sgml and the comment in
foreigncmds.c should be updated. Please find attached a patch.
Thanks,
Best regards,
Etsuro Fujita
Attachments:
fdw-doc-update.patchapplication/octet-stream; name=fdw-doc-update.patchDownload
diff --git a/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml b/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml
index 7376804..891ce73 100644
--- a/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml
+++ b/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml
@@ -92,9 +92,9 @@ ALTER FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable> REN
<para>
Note that it is possible that after changing the validator the
- options to the foreign-data wrapper, servers, and user mappings
- have become invalid. It is up to the user to make sure that
- these options are correct before using the foreign-data
+ options to the foreign-data wrapper, servers, user mappings, and
+ foreign tables have become invalid. It is up to the user to make
+ sure that these options are correct before using the foreign-data
wrapper.
</para>
</listitem>
diff --git a/src/backend/commands/foreigncmds.c b/src/backend/commands/foreigncmds.c
index fb31118..8598d11 100644
--- a/src/backend/commands/foreigncmds.c
+++ b/src/backend/commands/foreigncmds.c
@@ -39,7 +39,9 @@
/*
* Convert a DefElem list to the text array format that is used in
- * pg_foreign_data_wrapper, pg_foreign_server, and pg_user_mapping.
+ * pg_foreign_data_wrapper, pg_foreign_server, pg_user_mapping, and
+ * pg_foreign_table.
+ *
* Returns the array in the form of a Datum, or PointerGetDatum(NULL)
* if the list is empty.
*
@@ -88,7 +90,8 @@ optionListToArray(List *options)
* Returns the array in the form of a Datum, or PointerGetDatum(NULL)
* if the list is empty.
*
- * This is used by CREATE/ALTER of FOREIGN DATA WRAPPER/SERVER/USER MAPPING.
+ * This is used by CREATE/ALTER of FOREIGN DATA WRAPPER/SERVER/USER MAPPING/
+ * FOREIGN TABLE.
*/
Datum
transformGenericOptions(Oid catalogId,
@@ -681,8 +684,9 @@ AlterForeignDataWrapper(AlterFdwStmt *stmt)
repl_repl[Anum_pg_foreign_data_wrapper_fdwvalidator - 1] = true;
/*
- * It could be that the options for the FDW, SERVER and USER MAPPING
- * are no longer valid with the new validator. Warn about this.
+ * It could be that the options for the FDW, SERVER, USER MAPPING and
+ * FOREIGN TABLE are no longer valid with the new validator. Warn
+ * about this.
*/
if (OidIsValid(fdwvalidator))
ereport(WARNING,
I wrote:
ISTM the document in alter_foreign_data_wrapper.sgml and the comment in
foreigncmds.c should be updated. Please find attached a patch.
I've noticed that the document in create_foreign_data_wrapper.sgml should also
be updated. Attached is an updated version of the patch.
Thanks,
Best regards,
Etsuro Fujita
Attachments:
fdw-doc-update-2.patchapplication/octet-stream; name=fdw-doc-update-2.patchDownload
diff --git a/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml b/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml
index 7376804..891ce73 100644
--- a/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml
+++ b/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml
@@ -92,9 +92,9 @@ ALTER FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable> REN
<para>
Note that it is possible that after changing the validator the
- options to the foreign-data wrapper, servers, and user mappings
- have become invalid. It is up to the user to make sure that
- these options are correct before using the foreign-data
+ options to the foreign-data wrapper, servers, user mappings, and
+ foreign tables have become invalid. It is up to the user to make
+ sure that these options are correct before using the foreign-data
wrapper.
</para>
</listitem>
diff --git a/doc/src/sgml/ref/create_foreign_data_wrapper.sgml b/doc/src/sgml/ref/create_foreign_data_wrapper.sgml
index e2d897f..bfbdf4f 100644
--- a/doc/src/sgml/ref/create_foreign_data_wrapper.sgml
+++ b/doc/src/sgml/ref/create_foreign_data_wrapper.sgml
@@ -83,9 +83,9 @@ CREATE FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable>
<para><replaceable class="parameter">validator_function</replaceable> is the
name of a previously registered function that will be called to
check the generic options given to the foreign-data wrapper, as
- well as options for foreign servers and user mappings using the
- foreign-data wrapper. If no validator function or <literal>NO
- VALIDATOR</literal> is specified, then options will not be
+ well as options for foreign servers, user mappings and foreign tables
+ using the foreign-data wrapper. If no validator function or <literal>
+ NO VALIDATOR</literal> is specified, then options will not be
checked at creation time. (Foreign-data wrappers will possibly
ignore or reject invalid option specifications at run time,
depending on the implementation.) The validator function must
diff --git a/src/backend/commands/foreigncmds.c b/src/backend/commands/foreigncmds.c
index fb31118..8598d11 100644
--- a/src/backend/commands/foreigncmds.c
+++ b/src/backend/commands/foreigncmds.c
@@ -39,7 +39,9 @@
/*
* Convert a DefElem list to the text array format that is used in
- * pg_foreign_data_wrapper, pg_foreign_server, and pg_user_mapping.
+ * pg_foreign_data_wrapper, pg_foreign_server, pg_user_mapping, and
+ * pg_foreign_table.
+ *
* Returns the array in the form of a Datum, or PointerGetDatum(NULL)
* if the list is empty.
*
@@ -88,7 +90,8 @@ optionListToArray(List *options)
* Returns the array in the form of a Datum, or PointerGetDatum(NULL)
* if the list is empty.
*
- * This is used by CREATE/ALTER of FOREIGN DATA WRAPPER/SERVER/USER MAPPING.
+ * This is used by CREATE/ALTER of FOREIGN DATA WRAPPER/SERVER/USER MAPPING/
+ * FOREIGN TABLE.
*/
Datum
transformGenericOptions(Oid catalogId,
@@ -681,8 +684,9 @@ AlterForeignDataWrapper(AlterFdwStmt *stmt)
repl_repl[Anum_pg_foreign_data_wrapper_fdwvalidator - 1] = true;
/*
- * It could be that the options for the FDW, SERVER and USER MAPPING
- * are no longer valid with the new validator. Warn about this.
+ * It could be that the options for the FDW, SERVER, USER MAPPING and
+ * FOREIGN TABLE are no longer valid with the new validator. Warn
+ * about this.
*/
if (OidIsValid(fdwvalidator))
ereport(WARNING,
"Etsuro Fujita" <fujita.etsuro@lab.ntt.co.jp> writes:
I wrote:
ISTM the document in alter_foreign_data_wrapper.sgml and the comment in
foreigncmds.c should be updated. Please find attached a patch.
I've noticed that the document in create_foreign_data_wrapper.sgml should also
be updated. Attached is an updated version of the patch.
Applied with a bit of additional wordsmithing.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers