1ALTER SERVER(7)                  SQL Commands                  ALTER SERVER(7)
2
3
4

NAME

6       ALTER SERVER - change the definition of a foreign server
7
8

SYNOPSIS

10       ALTER SERVER servername [ VERSION 'newversion' ]
11           [ OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] ) ]
12       ALTER SERVER servername OWNER TO new_owner
13
14

DESCRIPTION

16       ALTER SERVER changes the definition of a foreign server. The first form
17       changes the server version string or the generic options of the  server
18       (at  least  one clause is required).  The second form changes the owner
19       of the server.
20
21       To alter the server you must be the owner of the server.   Additionally
22       to  alter  the  owner,  you must own the server and also be a direct or
23       indirect member of the new owning role, and you must have USAGE  privi‐
24       lege  on  the server's foreign-data wrapper. (Note that superusers sat‐
25       isfy all these criteria automatically.)
26

PARAMETERS

28       servername
29              The name of an existing server.
30
31       serverversion
32              New server version.
33
34       OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
35              Change options for the server. ADD, SET, and  DROP  specify  the
36              action  to  be  performed.  ADD  is  assumed  if no operation is
37              explicitly specified. Option names must  be  unique;  names  and
38              values  are also validated using the server's foreign-data wrap‐
39              per library.
40

EXAMPLES

42       Alter server foo, add connection options:
43
44       ALTER SERVER foo OPTIONS (host 'foo', dbname 'foodb');
45
46
47       Alter server foo, change version, change host option:
48
49       ALTER SERVER foo VERSION '8.4' OPTIONS (SET host 'baz');
50
51

COMPATIBILITY

53       ALTER SERVER conforms to ISO/IEC 9075-9 (SQL/MED).
54

SEE ALSO

56       CREATE SERVER [create_server(7)], DROP SERVER [drop_server(7)]
57
58
59
60SQL - Language Statements         2011-09-22                   ALTER SERVER(7)
Impressum