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