mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Improve documentation about usage of FDW validator functions.
SGML documentation, as well as code comments, failed to note that an FDW's validator will be applied to foreign-table options for foreign tables using the FDW. Etsuro Fujita
This commit is contained in:
@ -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 existing options for the FDW or dependent SERVER,
|
||||
* USER MAPPING or FOREIGN TABLE objects are no longer valid according
|
||||
* to the new validator. Warn about this.
|
||||
*/
|
||||
if (OidIsValid(fdwvalidator))
|
||||
ereport(WARNING,
|
||||
|
Reference in New Issue
Block a user