1ALTER USER MAPPING(7) SQL Commands ALTER USER MAPPING(7)
2
3
4
6 ALTER USER MAPPING - change the definition of a user mapping
7
8
10 ALTER USER MAPPING FOR { username | USER | CURRENT_USER | PUBLIC }
11 SERVER servername
12 OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
13
14
16 ALTER USER MAPPING changes the definition of a user mapping.
17
18 The owner of a foreign server can alter user mappings for that server
19 for any user. Also, a user can alter a user mapping for his own user
20 name if USAGE privilege on the server has been granted to the user.
21
23 username
24 User name of the mapping. CURRENT_USER and USER match the name
25 of the current user. PUBLIC is used to match all present and
26 future user names in the system.
27
28 servername
29 Server name of the user mapping.
30
31 OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
32 Change options for the user mapping. The new options override
33 any previously specified options. ADD, SET, and DROP specify the
34 action to be performed. ADD is assumed if no operation is
35 explicitly specified. Option names must be unique; options are
36 also validated by the server's foreign-data wrapper.
37
39 Change the password for user mapping bob, server foo:
40
41 ALTER USER MAPPING FOR bob SERVER foo OPTIONS (user 'bob', password 'public');
42
43
45 ALTER USER MAPPING conforms to ISO/IEC 9075-9 (SQL/MED). There is a
46 subtle syntax issue: The standard omits the FOR key word. Since both
47 CREATE USER MAPPING and DROP USER MAPPING use FOR in analogous posi‐
48 tions, and IBM DB2 (being the other major SQL/MED implementation) also
49 requires it for ALTER USER MAPPING, PostgreSQL diverges from the stan‐
50 dard here in the interest of consistency and interoperability.
51
53 CREATE USER MAPPING [create_user_mapping(7)], DROP USER MAPPING
54 [drop_user_mapping(7)]
55
56
57
58SQL - Language Statements 2014-02-17 ALTER USER MAPPING(7)