2 ALTER FOREIGN DATA WRAPPER
4 ALTER FOREIGN DATA WRAPPER — change the definition of a foreign-data
9 ALTER FOREIGN DATA WRAPPER name
10 [ HANDLER handler_function | NO HANDLER ]
11 [ VALIDATOR validator_function | NO VALIDATOR ]
12 [ OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ]) ]
13 ALTER FOREIGN DATA WRAPPER name OWNER TO { new_owner | CURRENT_ROLE | CURRENT_US
15 ALTER FOREIGN DATA WRAPPER name RENAME TO new_name
19 ALTER FOREIGN DATA WRAPPER changes the definition of a foreign-data
20 wrapper. The first form of the command changes the support functions or
21 the generic options of the foreign-data wrapper (at least one clause is
22 required). The second form changes the owner of the foreign-data
25 Only superusers can alter foreign-data wrappers. Additionally, only
26 superusers can own foreign-data wrappers.
31 The name of an existing foreign-data wrapper.
33 HANDLER handler_function
34 Specifies a new handler function for the foreign-data wrapper.
37 This is used to specify that the foreign-data wrapper should no
38 longer have a handler function.
40 Note that foreign tables that use a foreign-data wrapper with no
41 handler cannot be accessed.
43 VALIDATOR validator_function
44 Specifies a new validator function for the foreign-data wrapper.
46 Note that it is possible that pre-existing options of the
47 foreign-data wrapper, or of dependent servers, user mappings, or
48 foreign tables, are invalid according to the new validator.
49 PostgreSQL does not check for this. It is up to the user to make
50 sure that these options are correct before using the modified
51 foreign-data wrapper. However, any options specified in this
52 ALTER FOREIGN DATA WRAPPER command will be checked using the new
56 This is used to specify that the foreign-data wrapper should no
57 longer have a validator function.
59 OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
60 Change options for the foreign-data wrapper. ADD, SET, and DROP
61 specify the action to be performed. ADD is assumed if no
62 operation is explicitly specified. Option names must be unique;
63 names and values are also validated using the foreign data
64 wrapper's validator function, if any.
67 The user name of the new owner of the foreign-data wrapper.
70 The new name for the foreign-data wrapper.
74 Change a foreign-data wrapper dbi, add option foo, drop bar:
75 ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '1', DROP bar);
77 Change the foreign-data wrapper dbi validator to bob.myvalidator:
78 ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator;
82 ALTER FOREIGN DATA WRAPPER conforms to ISO/IEC 9075-9 (SQL/MED), except
83 that the HANDLER, VALIDATOR, OWNER TO, and RENAME clauses are
88 CREATE FOREIGN DATA WRAPPER, DROP FOREIGN DATA WRAPPER