ALTER FOREIGN DATA WRAPPER
SQL - Language Statements
ALTER FOREIGN DATA WRAPPER
change the definition of a foreign-data wrapper
ALTER FOREIGN DATA WRAPPER
ALTER FOREIGN DATA WRAPPER name
[ LIBRARY 'libraryname' ]
[ OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ]) ]
ALTER FOREIGN DATA WRAPPER name OWNER TO new_owner
Description
ALTER FOREIGN DATA WRAPPER changes the
definition of a foreign-data wrapper. The first form of the
command changes the library 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
The name of an existing foreign-data wrapper.
libraryname
New name of the foreign-data wrapper library.
Note that it is possible that after changing the library, 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.
OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
Change options for the foreign-data
wrapper. ADD>, SET>, and DROP>
specify the action to be performed. ADD> is assumed
if no operation is explicitly specified. Option names must be
unique; names and values are also validated using the foreign
data wrapper library.
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> library
to /home/bob/mylibrary.so>:
ALTER FOREIGN DATA WRAPPER dbi LIBRARY '/home/bob/mylibrary.so';
Compatibility
ALTER FOREIGN DATA WRAPPER conforms to ISO/IEC
9075-9 (SQL/MED). The standard does not specify the OWNER
TO> variant of the command.
See Also