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