3
PostgreSQL documentation
6
<refentry id="SQL-ALTERFOREIGNDATAWRAPPER">
8
<refentrytitle id="sql-alterforeigndatawrapper-title">ALTER FOREIGN DATA WRAPPER</refentrytitle>
9
<refmiscinfo>SQL - Language Statements</refmiscinfo>
13
<refname>ALTER FOREIGN DATA WRAPPER</refname>
14
<refpurpose>change the definition of a foreign-data wrapper</refpurpose>
17
<indexterm zone="sql-alterforeigndatawrapper">
18
<primary>ALTER FOREIGN DATA WRAPPER</primary>
23
ALTER FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable>
24
[ VALIDATOR <replaceable class="parameter">valfunction</replaceable> | NO VALIDATOR ]
25
[ OPTIONS ( [ ADD | SET | DROP ] <replaceable class="PARAMETER">option</replaceable> ['<replaceable class="PARAMETER">value</replaceable>'] [, ... ]) ]
26
ALTER FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable> OWNER TO <replaceable>new_owner</replaceable>
31
<title>Description</title>
34
<command>ALTER FOREIGN DATA WRAPPER</command> changes the
35
definition of a foreign-data wrapper. The first form of the
36
command changes the library or the generic options of the
37
foreign-data wrapper (at least one clause is required). The second
38
form changes the owner of the foreign-data wrapper.
42
Only superusers can alter foreign-data wrappers. Additionally,
43
only superusers can own foreign-data wrappers.
48
<title>Parameters</title>
52
<term><replaceable class="parameter">name</replaceable></term>
55
The name of an existing foreign-data wrapper.
61
<term><literal>VALIDATOR <replaceable class="parameter">valfunction</replaceable></literal></term>
64
Specifies a new foreign-data wrapper validator function.
68
Note that it is possible that after changing the validator the
69
options to the foreign-data wrapper, servers, and user mappings
70
have become invalid. It is up to the user to make sure that
71
these options are correct before using the foreign-data
78
<term><literal>NO VALIDATOR</literal></term>
81
This is used to specify that the foreign-data wrapper should no
82
longer have a validator function.
88
<term><literal>OPTIONS ( [ ADD | SET | DROP ] <replaceable class="PARAMETER">option</replaceable> ['<replaceable class="PARAMETER">value</replaceable>'] [, ... ] )</literal></term>
91
Change options for the foreign-data
92
wrapper. <literal>ADD</>, <literal>SET</>, and <literal>DROP</>
93
specify the action to be performed. <literal>ADD</> is assumed
94
if no operation is explicitly specified. Option names must be
95
unique; names and values are also validated using the foreign
104
<title>Examples</title>
107
Change a foreign-data wrapper <literal>dbi</>, add
108
option <literal>foo</>, drop <literal>bar</>:
110
ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '1', DROP 'bar');
115
Change the foreign-data wrapper <literal>dbi</> validator
116
to <literal>bob.myvalidator</>:
118
ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator;
124
<title>Compatibility</title>
127
<command>ALTER FOREIGN DATA WRAPPER</command> conforms to ISO/IEC
128
9075-9 (SQL/MED). The standard does not specify the <literal>
129
VALIDATOR</literal> and <literal>OWNER TO</> variants of the
135
<title>See Also</title>
137
<simplelist type="inline">
138
<member><xref linkend="sql-createforeigndatawrapper" endterm="sql-createforeigndatawrapper-title"></member>
139
<member><xref linkend="sql-dropforeigndatawrapper" endterm="sql-dropforeigndatawrapper-title"></member>