~ubuntu-branches/ubuntu/lucid/postgresql-8.4/lucid-proposed

« back to all changes in this revision

Viewing changes to doc/src/sgml/ref/alter_foreign_data_wrapper.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
$PostgreSQL$
 
3
PostgreSQL documentation
 
4
-->
 
5
 
 
6
<refentry id="SQL-ALTERFOREIGNDATAWRAPPER">
 
7
 <refmeta>
 
8
  <refentrytitle id="sql-alterforeigndatawrapper-title">ALTER FOREIGN DATA WRAPPER</refentrytitle>
 
9
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
10
 </refmeta>
 
11
 
 
12
 <refnamediv>
 
13
  <refname>ALTER FOREIGN DATA WRAPPER</refname>
 
14
  <refpurpose>change the definition of a foreign-data wrapper</refpurpose>
 
15
 </refnamediv>
 
16
 
 
17
 <indexterm zone="sql-alterforeigndatawrapper">
 
18
  <primary>ALTER FOREIGN DATA WRAPPER</primary>
 
19
 </indexterm>
 
20
 
 
21
 <refsynopsisdiv>
 
22
<synopsis>
 
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>
 
27
</synopsis>
 
28
 </refsynopsisdiv>
 
29
 
 
30
 <refsect1>
 
31
  <title>Description</title>
 
32
 
 
33
  <para>
 
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.
 
39
  </para>
 
40
 
 
41
  <para>
 
42
   Only superusers can alter foreign-data wrappers.  Additionally,
 
43
   only superusers can own foreign-data wrappers.
 
44
  </para>
 
45
 </refsect1>
 
46
 
 
47
 <refsect1>
 
48
  <title>Parameters</title>
 
49
 
 
50
  <variablelist>
 
51
   <varlistentry>
 
52
    <term><replaceable class="parameter">name</replaceable></term>
 
53
    <listitem>
 
54
     <para>
 
55
      The name of an existing foreign-data wrapper.
 
56
     </para>
 
57
    </listitem>
 
58
   </varlistentry>
 
59
 
 
60
   <varlistentry>
 
61
    <term><literal>VALIDATOR <replaceable class="parameter">valfunction</replaceable></literal></term>
 
62
    <listitem>
 
63
     <para>
 
64
      Specifies a new foreign-data wrapper validator function.
 
65
     </para>
 
66
 
 
67
     <para>
 
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
 
72
      wrapper.
 
73
     </para>
 
74
    </listitem>
 
75
   </varlistentry>
 
76
 
 
77
   <varlistentry>
 
78
    <term><literal>NO VALIDATOR</literal></term>
 
79
    <listitem>
 
80
     <para>
 
81
      This is used to specify that the foreign-data wrapper should no
 
82
      longer have a validator function.
 
83
     </para>
 
84
    </listitem>
 
85
   </varlistentry>
 
86
 
 
87
   <varlistentry>
 
88
    <term><literal>OPTIONS ( [ ADD | SET | DROP ] <replaceable class="PARAMETER">option</replaceable> ['<replaceable class="PARAMETER">value</replaceable>'] [, ... ] )</literal></term>
 
89
    <listitem>
 
90
     <para>
 
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
 
96
      data wrapper library.
 
97
     </para>
 
98
    </listitem>
 
99
   </varlistentry>
 
100
  </variablelist>
 
101
 </refsect1>
 
102
 
 
103
 <refsect1>
 
104
  <title>Examples</title>
 
105
 
 
106
  <para>
 
107
   Change a foreign-data wrapper <literal>dbi</>, add
 
108
   option <literal>foo</>, drop <literal>bar</>:
 
109
<programlisting>
 
110
ALTER FOREIGN DATA WRAPPER dbi OPTIONS (ADD foo '1', DROP 'bar');
 
111
</programlisting>
 
112
  </para>
 
113
 
 
114
  <para>
 
115
   Change the foreign-data wrapper <literal>dbi</> validator
 
116
   to <literal>bob.myvalidator</>:
 
117
<programlisting>
 
118
ALTER FOREIGN DATA WRAPPER dbi VALIDATOR bob.myvalidator;
 
119
</programlisting>
 
120
  </para>
 
121
 </refsect1>
 
122
 
 
123
 <refsect1>
 
124
  <title>Compatibility</title>
 
125
 
 
126
  <para>
 
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
 
130
   command.
 
131
  </para>
 
132
 </refsect1>
 
133
 
 
134
 <refsect1>
 
135
  <title>See Also</title>
 
136
 
 
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>
 
140
  </simplelist>
 
141
 </refsect1>
 
142
 
 
143
</refentry>