1ALTER FOREIGN DATA WRAPPEPRo(s7t)greSQL 9.2.24 DocumentAaLtTiEoRnFOREIGN DATA WRAPPER(7)
2
3
4

NAME

6       ALTER_FOREIGN_DATA_WRAPPER - change the definition of a foreign-data
7       wrapper
8

SYNOPSIS

10       ALTER FOREIGN DATA WRAPPER name
11           [ HANDLER handler_function | NO HANDLER ]
12           [ VALIDATOR validator_function | NO VALIDATOR ]
13           [ OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ]) ]
14       ALTER FOREIGN DATA WRAPPER name OWNER TO new_owner
15       ALTER FOREIGN DATA WRAPPER name RENAME TO new_name
16

DESCRIPTION

18       ALTER FOREIGN DATA WRAPPER changes the definition of a foreign-data
19       wrapper. The first form of the command changes the support functions or
20       the generic options of the foreign-data wrapper (at least one clause is
21       required). The second form changes the owner of the foreign-data
22       wrapper.
23
24       Only superusers can alter foreign-data wrappers. Additionally, only
25       superusers can own foreign-data wrappers.
26

PARAMETERS

28       name
29           The name of an existing foreign-data wrapper.
30
31       HANDLER handler_function
32           Specifies a new handler function for the foreign-data wrapper.
33
34       NO HANDLER
35           This is used to specify that the foreign-data wrapper should no
36           longer have a handler function.
37
38           Note that foreign tables that use a foreign-data wrapper with no
39           handler cannot be accessed.
40
41       VALIDATOR validator_function
42           Specifies a new validator function for the foreign-data wrapper.
43
44           Note that it is possible that after changing the validator the
45           options to the foreign-data wrapper, servers, and user mappings
46           have become invalid. It is up to the user to make sure that these
47           options are correct before using the foreign-data wrapper.
48
49       NO VALIDATOR
50           This is used to specify that the foreign-data wrapper should no
51           longer have a validator function.
52
53       OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
54           Change options for the foreign-data wrapper.  ADD, SET, and DROP
55           specify the action to be performed.  ADD is assumed if no operation
56           is explicitly specified. Option names must be unique; names and
57           values are also validated using the foreign data wrapper's
58           validator function, if any.
59
60       new_owner
61           The user name of the new owner of the foreign-data wrapper.
62
63       new_name
64           The new name for the foreign-data wrapper.
65

EXAMPLES

67       Change a foreign-data wrapper dbi, add option foo, drop bar:
68
69           ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '1', DROP 'bar');
70
71       Change the foreign-data wrapper dbi validator to bob.myvalidator:
72
73           ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator;
74

COMPATIBILITY

76       ALTER FOREIGN DATA WRAPPER conforms to ISO/IEC 9075-9 (SQL/MED), except
77       that the HANDLER, VALIDATOR, OWNER TO, and RENAME clauses are
78       extensions.
79

SEE ALSO

81       CREATE FOREIGN DATA WRAPPER (CREATE_FOREIGN_DATA_WRAPPER(7)), DROP
82       FOREIGN DATA WRAPPER (DROP_FOREIGN_DATA_WRAPPER(7))
83
84
85
86PostgreSQL 9.2.24                 2017-11-06     ALTER FOREIGN DATA WRAPPER(7)
Impressum