3 PostgreSQL documentation
6 <refentry id=
"SQL-ALTERFOREIGNDATAWRAPPER">
8 <refentrytitle id=
"sql-alterforeigndatawrapper-title">ALTER FOREIGN DATA WRAPPER
</refentrytitle>
9 <manvolnum>7</manvolnum>
10 <refmiscinfo>SQL - Language Statements
</refmiscinfo>
14 <refname>ALTER FOREIGN DATA WRAPPER
</refname>
15 <refpurpose>change the definition of a foreign-data wrapper
</refpurpose>
18 <indexterm zone=
"sql-alterforeigndatawrapper">
19 <primary>ALTER FOREIGN DATA WRAPPER
</primary>
24 ALTER FOREIGN DATA WRAPPER
<replaceable class=
"parameter">name
</replaceable>
25 [ VALIDATOR
<replaceable class=
"parameter">valfunction
</replaceable> | NO VALIDATOR ]
26 [ OPTIONS ( [ ADD | SET | DROP ]
<replaceable class=
"PARAMETER">option
</replaceable> ['
<replaceable class=
"PARAMETER">value
</replaceable>'] [, ... ]) ]
27 ALTER FOREIGN DATA WRAPPER
<replaceable class=
"parameter">name
</replaceable> OWNER TO
<replaceable>new_owner
</replaceable>
32 <title>Description
</title>
35 <command>ALTER FOREIGN DATA WRAPPER
</command> changes the
36 definition of a foreign-data wrapper. The first form of the
37 command changes the library or the generic options of the
38 foreign-data wrapper (at least one clause is required). The second
39 form changes the owner of the foreign-data wrapper.
43 Only superusers can alter foreign-data wrappers. Additionally,
44 only superusers can own foreign-data wrappers.
49 <title>Parameters
</title>
53 <term><replaceable class=
"parameter">name
</replaceable></term>
56 The name of an existing foreign-data wrapper.
62 <term><literal>VALIDATOR
<replaceable class=
"parameter">valfunction
</replaceable></literal></term>
65 Specifies a new foreign-data wrapper validator function.
69 Note that it is possible that after changing the validator the
70 options to the foreign-data wrapper, servers, and user mappings
71 have become invalid. It is up to the user to make sure that
72 these options are correct before using the foreign-data
79 <term><literal>NO VALIDATOR
</literal></term>
82 This is used to specify that the foreign-data wrapper should no
83 longer have a validator function.
89 <term><literal>OPTIONS ( [ ADD | SET | DROP ]
<replaceable class=
"PARAMETER">option
</replaceable> ['
<replaceable class=
"PARAMETER">value
</replaceable>'] [, ... ] )
</literal></term>
92 Change options for the foreign-data
93 wrapper.
<literal>ADD<
/>,
<literal>SET<
/>, and
<literal>DROP<
/>
94 specify the action to be performed.
<literal>ADD<
/> is assumed
95 if no operation is explicitly specified. Option names must be
96 unique; names and values are also validated using the foreign
105 <title>Examples
</title>
108 Change a foreign-data wrapper
<literal>dbi<
/>, add
109 option
<literal>foo<
/>, drop
<literal>bar<
/>:
111 ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '
1', DROP 'bar');
116 Change the foreign-data wrapper
<literal>dbi<
/> validator
117 to
<literal>bob.myvalidator<
/>:
119 ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator;
125 <title>Compatibility
</title>
128 <command>ALTER FOREIGN DATA WRAPPER
</command> conforms to ISO/IEC
129 9075-
9 (SQL/MED). The standard does not specify the
<literal>
130 VALIDATOR
</literal> and
<literal>OWNER TO<
/> variants of the
136 <title>See Also
</title>
138 <simplelist type=
"inline">
139 <member><xref linkend=
"sql-createforeigndatawrapper" endterm=
"sql-createforeigndatawrapper-title"></member>
140 <member><xref linkend=
"sql-dropforeigndatawrapper" endterm=
"sql-dropforeigndatawrapper-title"></member>