of the foreign-data
wrapper, or of dependent servers, user mappings, or foreign tables, are
invalid according to the new validator. <productname>PostgreSQL</productname> does
not check for this. It is up to the user to make sure that these
options are correct before using the modified foreign-data wrapper.
However, any options specified in this <command>ALTER FOREIGN DATA
WRAPPER</command> command will be checked using the new validator.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>NO VALIDATOR</literal></term>
<listitem>
<para>
This is used to specify that the foreign-data wrapper should no
longer have a validator function.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>OPTIONS ( [ ADD | SET | DROP ] <replaceable class="parameter">option</replaceable> ['<replaceable class="parameter">value</replaceable>'] [, ... ] )</literal></term>
<listitem>
<para>
Change options for the foreign-data
wrapper. <literal>ADD</literal>, <literal>SET</literal>, and <literal>DROP</literal>
specify the action to be performed. <literal>ADD</literal> is assumed
if no operation is explicitly specified. Option names must be
unique; names and values are also validated using the foreign
data wrapper's validator function, if any.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">new_owner</replaceable></term>
<listitem>
<para>
The user name of the new owner of the foreign-data wrapper.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">new_name</replaceable></term>
<listitem>
<para>
The new name for the foreign-data wrapper.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
Change a foreign-data wrapper <literal>dbi</literal>, add
option <literal>foo</literal>, drop <literal>bar</literal>:
<programlisting>
ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '1', DROP bar);
</programlisting>
</para>
<para>
Change the foreign-data wrapper <literal>dbi</literal> validator
to <literal>bob.myvalidator</literal>:
<programlisting>
ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator;
</programlisting></para>
</refsect1>
<refsect1>
<title>Compatibility</title>
<para>
<command>ALTER FOREIGN DATA WRAPPER</command> conforms to ISO/IEC
9075-9 (SQL/MED), except that the <literal>HANDLER</literal>,
<literal>VALIDATOR</literal>, <literal>OWNER TO</literal>, and <literal>RENAME</literal>
clauses are extensions.
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<simplelist type="inline">
<member><xref linkend="sql-createforeigndatawrapper"/></member>
<member><xref linkend="sql-dropforeigndatawrapper"/></member>
</simplelist>
</refsect1>
</refentry>