Summary
The catalog pg_auth_members shows the membership relations between roles. Any non-circular set of relationships is allowed.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_auth_members system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
oidoid
Row identifierroleidoidreferencespg_authid.oid
ID of a role that has a membermemberoidreferencespg_authid.oid
ID of a role that is a member of roleidgrantoroidreferencespg_authid.oid
ID of the role that granted this membershipadmin_optionbool
True if member can grant membership in roleid to othersinherit_optionbool
True if the member automatically inherits the privileges of the granted roleset_optionbool
True if the member can SET ROLE to the granted role
Related catalogs
This object references the following other system catalogs:
roleid→pg_authid
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_auth_members.