~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
doc/src/sgml/ref/alter_server.sgml
 
3
PostgreSQL documentation
 
4
-->
 
5
 
 
6
<refentry id="SQL-ALTERSERVER">
 
7
 <refmeta>
 
8
  <refentrytitle>ALTER SERVER</refentrytitle>
 
9
  <manvolnum>7</manvolnum>
 
10
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 
11
 </refmeta>
 
12
 
 
13
 <refnamediv>
 
14
  <refname>ALTER SERVER</refname>
 
15
  <refpurpose>change the definition of a foreign server</refpurpose>
 
16
 </refnamediv>
 
17
 
 
18
 <indexterm zone="sql-alterserver">
 
19
  <primary>ALTER SERVER</primary>
 
20
 </indexterm>
 
21
 
 
22
 <refsynopsisdiv>
 
23
<synopsis>
 
24
ALTER SERVER <replaceable class="parameter">server_name</replaceable> [ VERSION '<replaceable class="parameter">new_version</replaceable>' ]
 
25
    [ OPTIONS ( [ ADD | SET | DROP ] <replaceable class="PARAMETER">option</replaceable> ['<replaceable class="PARAMETER">value</replaceable>'] [, ... ] ) ]
 
26
ALTER SERVER <replaceable class="PARAMETER">server_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 SERVER</command> changes the definition of a foreign
 
35
   server.  The first form changes the server version string or the
 
36
   generic options of the server (at least one clause is required).
 
37
   The second form changes the owner of the server.
 
38
  </para>
 
39
 
 
40
  <para>
 
41
   To alter the server you must be the owner of the server.
 
42
   Additionally to alter the owner, you must own the server and also
 
43
   be a direct or indirect member of the new owning role, and you must
 
44
   have <literal>USAGE</> privilege on the server's foreign-data
 
45
   wrapper.  (Note that superusers satisfy all these criteria
 
46
   automatically.)
 
47
  </para>
 
48
 </refsect1>
 
49
 
 
50
 <refsect1>
 
51
  <title>Parameters</title>
 
52
 
 
53
  <variablelist>
 
54
   <varlistentry>
 
55
    <term><replaceable class="parameter">server_name</replaceable></term>
 
56
    <listitem>
 
57
     <para>
 
58
      The name of an existing server.
 
59
     </para>
 
60
    </listitem>
 
61
   </varlistentry>
 
62
 
 
63
   <varlistentry>
 
64
    <term><replaceable class="parameter">new_version</replaceable></term>
 
65
    <listitem>
 
66
     <para>
 
67
      New server version.
 
68
     </para>
 
69
    </listitem>
 
70
   </varlistentry>
 
71
 
 
72
   <varlistentry>
 
73
    <term><literal>OPTIONS ( [ ADD | SET | DROP ] <replaceable class="PARAMETER">option</replaceable> ['<replaceable class="PARAMETER">value</replaceable>'] [, ... ] )</literal></term>
 
74
    <listitem>
 
75
     <para>
 
76
      Change options for the
 
77
      server.  <literal>ADD</>, <literal>SET</>, and <literal>DROP</>
 
78
      specify the action to be performed.  <literal>ADD</> is assumed
 
79
      if no operation is explicitly specified.  Option names must be
 
80
      unique; names and values are also validated using the server's
 
81
      foreign-data wrapper library.
 
82
     </para>
 
83
    </listitem>
 
84
   </varlistentry>
 
85
  </variablelist>
 
86
 </refsect1>
 
87
 
 
88
 <refsect1>
 
89
  <title>Examples</title>
 
90
 
 
91
  <para>
 
92
   Alter server <literal>foo</>, add connection options:
 
93
<programlisting>
 
94
ALTER SERVER foo OPTIONS (host 'foo', dbname 'foodb');
 
95
</programlisting>
 
96
  </para>
 
97
 
 
98
  <para>
 
99
   Alter server <literal>foo</>, change version,
 
100
   change <literal>host</> option:
 
101
<programlisting>
 
102
ALTER SERVER foo VERSION '8.4' OPTIONS (SET host 'baz');
 
103
</programlisting>
 
104
  </para>
 
105
 </refsect1>
 
106
 
 
107
 <refsect1>
 
108
  <title>Compatibility</title>
 
109
 
 
110
  <para>
 
111
   <command>ALTER SERVER</command> conforms to ISO/IEC 9075-9 (SQL/MED).
 
112
  </para>
 
113
 </refsect1>
 
114
 
 
115
 <refsect1>
 
116
  <title>See Also</title>
 
117
 
 
118
  <simplelist type="inline">
 
119
   <member><xref linkend="sql-createserver"></member>
 
120
   <member><xref linkend="sql-dropserver"></member>
 
121
  </simplelist>
 
122
 </refsect1>
 
123
 
 
124
</refentry>