1ALTER FOREIGN DATA WRAPPERP(o7s)tgreSQL 11.3 DocumentaAtLiToEnR FOREIGN 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 | CURRENT_USER | SESSION_USER }
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 pre-existing options of the
45           foreign-data wrapper, or of dependent servers, user mappings, or
46           foreign tables, are invalid according to the new validator.
47           PostgreSQL does not check for this. It is up to the user to make
48           sure that these options are correct before using the modified
49           foreign-data wrapper. However, any options specified in this ALTER
50           FOREIGN DATA WRAPPER command will be checked using the new
51           validator.
52
53       NO VALIDATOR
54           This is used to specify that the foreign-data wrapper should no
55           longer have a validator function.
56
57       OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
58           Change options for the foreign-data wrapper.  ADD, SET, and DROP
59           specify the action to be performed.  ADD is assumed if no operation
60           is explicitly specified. Option names must be unique; names and
61           values are also validated using the foreign data wrapper's
62           validator function, if any.
63
64       new_owner
65           The user name of the new owner of the foreign-data wrapper.
66
67       new_name
68           The new name for the foreign-data wrapper.
69

EXAMPLES

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

COMPATIBILITY

80       ALTER FOREIGN DATA WRAPPER conforms to ISO/IEC 9075-9 (SQL/MED), except
81       that the HANDLER, VALIDATOR, OWNER TO, and RENAME clauses are
82       extensions.
83

SEE ALSO

85       CREATE FOREIGN DATA WRAPPER (CREATE_FOREIGN_DATA_WRAPPER(7)), DROP
86       FOREIGN DATA WRAPPER (DROP_FOREIGN_DATA_WRAPPER(7))
87
88
89
90PostgreSQL 11.3                      2019        ALTER FOREIGN DATA WRAPPER(7)
Impressum