]> begriffs open source - ai-pg/blob - full-docs/txt/sql-alterusermapping.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-alterusermapping.txt
1
2 ALTER USER MAPPING
3
4    ALTER USER MAPPING — change the definition of a user mapping
5
6 Synopsis
7
8 ALTER USER MAPPING FOR { user_name | USER | CURRENT_ROLE | CURRENT_USER | SESSIO
9 N_USER | PUBLIC }
10     SERVER server_name
11     OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
12
13 Description
14
15    ALTER USER MAPPING changes the definition of a user mapping.
16
17    The owner of a foreign server can alter user mappings for that server
18    for any user. Also, a user can alter a user mapping for their own user
19    name if USAGE privilege on the server has been granted to the user.
20
21 Parameters
22
23    user_name
24           User name of the mapping. CURRENT_ROLE, CURRENT_USER, and USER
25           match the name of the current user. PUBLIC is used to match all
26           present and future user names in the system.
27
28    server_name
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
38 Examples
39
40    Change the password for user mapping bob, server foo:
41 ALTER USER MAPPING FOR bob SERVER foo OPTIONS (SET password 'public');
42
43 Compatibility
44
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
48    positions, and IBM DB2 (being the other major SQL/MED implementation)
49    also requires it for ALTER USER MAPPING, PostgreSQL diverges from the
50    standard here in the interest of consistency and interoperability.
51
52 See Also
53
54    CREATE USER MAPPING, DROP USER MAPPING