pg_user_mappings
The pg_user_mappings view provides access to information about user mappings.
This view is essentially a public-readable view of the pg_user_mapping system catalog table that omits the options field if the user does not have access rights to view it.
| Column | Type | References | Description |
|---|---|---|---|
umid |
oid |
pg_user_mapping.oid |
OID of the user mapping |
srvid |
oid |
pg_foreign_server.oid |
OID of the foreign server that contains this mapping |
srvname |
text |
pg_foreign_server.srvname |
Name of the foreign server |
umuser |
oid |
pg_authid.oid |
OID of the local role being mapped, |
usename |
name |
— |
Name of the local user to be mapped |
umoptions |
text[] |
— |
User mapping-specific options, as |
To protect password information stored as a user mapping option, the umoptions column reads as NULL unless one of the following applies:
-
The current user is the user being mapped, and owns the server or holds
USAGEprivilege on it. -
The current user is the server owner and the mapping is for
PUBLIC. -
The current user is a superuser.