table of contents
ALTER FOREIGN DATA WRAPPER(7) | PostgreSQL 9.2.24 Documentation | ALTER FOREIGN DATA WRAPPER(7) |
NAME¶
ALTER_FOREIGN_DATA_WRAPPER - change the definition of a foreign-data wrapper
SYNOPSIS¶
ALTER FOREIGN DATA WRAPPER name
[ HANDLER handler_function | NO HANDLER ]
[ VALIDATOR validator_function | NO VALIDATOR ]
[ OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ]) ] ALTER FOREIGN DATA WRAPPER name OWNER TO new_owner ALTER FOREIGN DATA WRAPPER name RENAME TO new_name
DESCRIPTION¶
ALTER FOREIGN DATA WRAPPER changes the definition of a foreign-data wrapper. The first form of the command changes the support functions or the generic options of the foreign-data wrapper (at least one clause is required). The second form changes the owner of the foreign-data wrapper.
Only superusers can alter foreign-data wrappers. Additionally, only superusers can own foreign-data wrappers.
PARAMETERS¶
name
HANDLER handler_function
NO HANDLER
Note that foreign tables that use a foreign-data wrapper with no handler cannot be accessed.
VALIDATOR validator_function
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 wrapper.
NO VALIDATOR
OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
new_owner
new_name
EXAMPLES¶
Change a foreign-data wrapper dbi, add option foo, drop bar:
ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '1', DROP 'bar');
Change the foreign-data wrapper dbi validator to bob.myvalidator:
ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator;
COMPATIBILITY¶
ALTER FOREIGN DATA WRAPPER conforms to ISO/IEC 9075-9 (SQL/MED), except that the HANDLER, VALIDATOR, OWNER TO, and RENAME clauses are extensions.
SEE ALSO¶
CREATE FOREIGN DATA WRAPPER (CREATE_FOREIGN_DATA_WRAPPER(7)), DROP FOREIGN DATA WRAPPER (DROP_FOREIGN_DATA_WRAPPER(7))
2017-11-06 | PostgreSQL 9.2.24 |