ALTER USER MAPPING
ALTER USER MAPPING — Change the Definition of a User Mapping
Synopsis
ALTER USER MAPPING FOR { user_name | USER | CURRENT_USER | SESSION_USER | PUBLIC }
SERVER server_name
OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
Description
ALTER USER MAPPING changes the definition of a user mapping.
The owner of a foreign server can alter user mappings for any user on that server. Additionally, a user who has been granted USAGE privilege on the foreign server can alter a user mapping for their own user name.
Parameters
user_name
The user name of the mapping. CURRENT_USER and USER match the name of the current user. PUBLIC is used to match all present and future user names in the system.
server_name
The server name of the user mapping.
OPTIONS ( [ ADD | SET | DROP ] option ['value'] [, ... ] )
Changes options for the user mapping. New options override any previously specified options. ADD, SET, and DROP specify the action to perform. If no operation is explicitly specified, ADD is assumed. Option names must be unique, and options are also validated by the server's foreign-data wrapper.
Examples
# Change the password for user mapping bob of server foo:
ALTER USER MAPPING FOR bob SERVER foo OPTIONS (SET password 'public');