2008-12-19 17:25:19 +01:00
|
|
|
<!--
|
2009-06-19 17:28:25 +02:00
|
|
|
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_foreign_data_wrapper.sgml,v 1.3 2009/06/19 15:28:25 petere Exp $
|
2008-12-19 17:25:19 +01:00
|
|
|
PostgreSQL documentation
|
|
|
|
-->
|
|
|
|
|
|
|
|
<refentry id="SQL-ALTERFOREIGNDATAWRAPPER">
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle id="sql-alterforeigndatawrapper-title">ALTER FOREIGN DATA WRAPPER</refentrytitle>
|
2009-06-19 17:28:25 +02:00
|
|
|
<manvolnum>7</manvolnum>
|
2008-12-19 17:25:19 +01:00
|
|
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>ALTER FOREIGN DATA WRAPPER</refname>
|
|
|
|
<refpurpose>change the definition of a foreign-data wrapper</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<indexterm zone="sql-alterforeigndatawrapper">
|
|
|
|
<primary>ALTER FOREIGN DATA WRAPPER</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<synopsis>
|
|
|
|
ALTER FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable>
|
2009-02-24 11:06:36 +01:00
|
|
|
[ VALIDATOR <replaceable class="parameter">valfunction</replaceable> | NO VALIDATOR ]
|
2008-12-19 17:25:19 +01:00
|
|
|
[ OPTIONS ( [ ADD | SET | DROP ] <replaceable class="PARAMETER">option</replaceable> ['<replaceable class="PARAMETER">value</replaceable>'] [, ... ]) ]
|
|
|
|
ALTER FOREIGN DATA WRAPPER <replaceable class="parameter">name</replaceable> OWNER TO <replaceable>new_owner</replaceable>
|
|
|
|
</synopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>ALTER FOREIGN DATA WRAPPER</command> changes the
|
|
|
|
definition of a foreign-data wrapper. The first form of the
|
|
|
|
command changes the library or the generic options of the
|
|
|
|
foreign-data wrapper (at least one clause is required). The second
|
|
|
|
form changes the owner of the foreign-data wrapper.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Only superusers can alter foreign-data wrappers. Additionally,
|
|
|
|
only superusers can own foreign-data wrappers.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Parameters</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable class="parameter">name</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The name of an existing foreign-data wrapper.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2009-02-24 11:06:36 +01:00
|
|
|
<term><literal>VALIDATOR <replaceable class="parameter">valfunction</replaceable></literal></term>
|
2008-12-19 17:25:19 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2009-02-24 11:06:36 +01:00
|
|
|
Specifies a new foreign-data wrapper validator function.
|
2008-12-19 17:25:19 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2009-02-24 11:06:36 +01:00
|
|
|
Note that it is possible that after changing the validator the
|
2008-12-19 17:25:19 +01:00
|
|
|
options to the foreign-data wrapper, servers, and user mappings
|
|
|
|
have become invalid. It is up to the user to make sure that
|
|
|
|
these options are correct before using the foreign-data
|
|
|
|
wrapper.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2009-02-24 11:06:36 +01:00
|
|
|
<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>
|
|
|
|
|
2008-12-19 17:25:19 +01:00
|
|
|
<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>SET</>, and <literal>DROP</>
|
|
|
|
specify the action to be performed. <literal>ADD</> is assumed
|
|
|
|
if no operation is explicitly specified. Option names must be
|
|
|
|
unique; names and values are also validated using the foreign
|
|
|
|
data wrapper library.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Examples</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Change a foreign-data wrapper <literal>dbi</>, add
|
|
|
|
option <literal>foo</>, drop <literal>bar</>:
|
|
|
|
<programlisting>
|
|
|
|
ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '1', DROP 'bar');
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2009-02-24 11:06:36 +01:00
|
|
|
Change the foreign-data wrapper <literal>dbi</> validator
|
|
|
|
to <literal>bob.myvalidator</>:
|
2008-12-19 17:25:19 +01:00
|
|
|
<programlisting>
|
2009-02-24 11:06:36 +01:00
|
|
|
ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator;
|
2008-12-19 17:25:19 +01:00
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Compatibility</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>ALTER FOREIGN DATA WRAPPER</command> conforms to ISO/IEC
|
2009-02-24 11:06:36 +01:00
|
|
|
9075-9 (SQL/MED). The standard does not specify the <literal>
|
|
|
|
VALIDATOR</literal> and <literal>OWNER TO</> variants of the
|
|
|
|
command.
|
2008-12-19 17:25:19 +01:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See Also</title>
|
|
|
|
|
|
|
|
<simplelist type="inline">
|
|
|
|
<member><xref linkend="sql-createforeigndatawrapper" endterm="sql-createforeigndatawrapper-title"></member>
|
|
|
|
<member><xref linkend="sql-dropforeigndatawrapper" endterm="sql-dropforeigndatawrapper-title"></member>
|
|
|
|
</simplelist>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
</refentry>
|