ALTER USER MAPPING
Changes the definition of a user mapping for a foreign server.
Synopsis
ALTER USER MAPPING FOR { <username> | USER | CURRENT_USER | PUBLIC }
SERVER <servername>
OPTIONS ( [ ADD | SET | DROP ] <option> ['<value>'] [, ... ] )
Description
ALTER USER MAPPING changes the definition of a user mapping for a foreign server.
The owner of a foreign server can alter user mappings for that server for any user.
Also, a user granted USAGE privilege on the server can alter a user mapping for their own user name.
Parameters
| Parameter | Description |
|---|---|
username |
User name of the mapping.
|
servername |
Foreign server name |
OPTIONS ( [ ADD | SET | DROP ] <option> ['<value>'] [, … ] ) |
Changes options for the user mapping.
The new options override any previously specified options.
|
Examples
Change the password for user mapping bob, server foo:
ALTER USER MAPPING FOR bob SERVER foo OPTIONS (SET password 'public');
Compatibility
ALTER USER MAPPING conforms to ISO/IEC 9075-9 (SQL/MED).
There is a subtle syntax issue: the standard omits the FOR keyword.
Since both CREATE USER MAPPING and DROP USER MAPPING use FOR in analogous positions, Greengage DB diverges from the standard here in the interest of consistency and interoperability.