↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / System Catalogs

pg_authid

The catalog pg_authid contains information about database authorization identifiers (roles). A role subsumes the concepts of “users” and “groups”. A user is essentially just a role with the rolcanlogin flag set. Any role (with or without rolcanlogin) can have other roles as members; see pg_auth_members. Since this catalog contains passwords, it must not be publicly readable. pg_roles is a publicly readable view on pg_authid that blanks out the password field. Chapter 21 contains detailed information about user and privilege management. Because user identities are cluster-wide, pg_authid is shared across all databases of a cluster: there is only one copy of pg_authid per cluster, not one per database.

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

kind
catalog
lang
en
measured attributes
true
metadata release
18.6
runtime columns
oid, rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, rolvaliduntil
runtime verified
false
source
english-manual

Definition PG 18

The catalog pg_authid contains information about database authorization identifiers (roles). A role subsumes the concepts of “users” and “groups”. A user is essentially just a role with the rolcanlogin flag set. Any role (with or without rolcanlogin) can have other roles as members; see pg_auth_members. Since this catalog contains passwords, it must not be publicly readable. pg_roles is a publicly readable view on pg_authid that blanks out the password field. Chapter 21 contains detailed information about user and privilege management. Because user identities are cluster-wide, pg_authid is shared across all databases of a cluster: there is only one copy of pg_authid per cluster, not one per database.

Catalog columns

ColumnTypeNullabilityDescription
oidoidNot nullRow identifier
rolnamenameNot nullRole name
rolsuperboolNot nullRole has superuser privileges
rolinheritboolNot nullRole automatically inherits privileges of roles it is a member of
rolcreateroleboolNot nullRole can create more roles
rolcreatedbboolNot nullRole can create databases
rolcanloginboolNot nullRole can log in. That is, this role can be given as the initial session authorization identifier.
rolreplicationboolNot nullRole is a replication role. A replication role can initiate replication connections and create and drop replication slots.
rolbypassrlsboolNot nullRole bypasses every row-level security policy, see Section 5.9 for more information.
rolconnlimitint4Not nullFor roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit.
rolpasswordtextNullableEncrypted password; null if none. The format depends on the form of encryption used.
rolvaliduntiltimestamptzNullablePassword expiry time (only used for password authentication); null if no expiration

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · catalog-bilingual-repair:28dbfaf387a11f0d2d1fc71bd3ac1cca6bbf26418f5147bbd6be341b4546c6f4

Text language: en · catalog-bilingual-repair:28dbfaf387a11f0d2d1fc71bd3ac1cca6bbf26418f5147bbd6be341b4546c6f4