Skip to content
← Catalog atlas / pg_authid

SYSTEM CATALOG · System catalog

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.

First seen PG 9.0Last seen PG 19Columns 12

Checked column by column against a PostgreSQL 18.6 instance · Raw measurement record ↗

Columns PostgreSQL 18

pg_authid
COLUMNTYPEDESCRIPTION
oid oidNOT NULL Row identifier
rolname nameNOT NULL Role name
rolsuper booleanNOT NULLDocumented as:bool Role has superuser privileges
rolinherit booleanNOT NULLDocumented as:bool Role automatically inherits privileges of roles it is a member of
rolcreaterole booleanNOT NULLDocumented as:bool Role can create more roles
rolcreatedb booleanNOT NULLDocumented as:bool Role can create databases
rolcanlogin booleanNOT NULLDocumented as:bool Role can log in. That is, this role can be given as the initial session authorization identifier.
rolreplication booleanNOT NULLDocumented as:bool Role is a replication role. A replication role can initiate replication connections and create and drop replication slots.
rolbypassrls booleanNOT NULLDocumented as:bool Role bypasses every row-level security policy, see Section 5.9 for more information.
rolconnlimit integerNOT NULLDocumented as:int4 For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit.
rolpassword text Encrypted password; null if none. The format depends on the form of encryption used.
rolvaliduntil timestamp with time zoneDocumented as:timestamptz Password expiry time (only used for password authentication); null if no expiration

Columns marked "implicit" are not included in SELECT *; some early statistics views are completed from same-version source, and the extra provenance is shown in the column description.

Common system columns 6

System attributes PostgreSQL provides, normally not expanded by SELECT *. Kept separately so they are not mixed in with ordinary columns.

ColumnsTypeattnum
tableoidoid-6
cmaxcid-5
xmaxxid-4
cmincid-3
xminxid-2
ctidtid-1

Column evolution matrix

Hover a cell for the column type
PresentAdded / type or attribute changeRemoved
COLUMN9.09.19.29.39.49.59.610111213141516171819
oid
rolname
rolsuper
rolinherit
rolcreaterole
rolcreatedb
rolcatupdate
rolcanlogin
rolconnlimit
rolpassword
rolvaliduntil
rolreplication
rolbypassrls

9.0 is the coverage baseline; a column already present in the baseline is not marked as added. The matrix aligns columns by name, so a rename appears as the old column removed and a new column added.

Evolution timeline

Changes between adjacent majors

PostgreSQL 19 ← 18

1 column description updates

PostgreSQL 17 ← 16

1 column description updatesCatalog description updated

PostgreSQL 14 ← 13

1 column description updatesCatalog description updated

PostgreSQL 13 ← 12

1 column description updates

PostgreSQL 12 ← 11

~ oid: implicit → ordinary2 column description updates

PostgreSQL 10 ← 9.6

1 column description updatesCatalog description updated

PostgreSQL 9.6 ← 9.5

1 column description updatesCatalog description updated

PostgreSQL 9.5 ← 9.4

+ rolbypassrls− rolcatupdate1 column description updates

PostgreSQL 9.3 ← 9.2

1 column description updates

PostgreSQL 9.1 ← 9.0

+ rolreplication1 column description updates

Compare any two versions

Pick two versions to see added, removed, and retyped columns. The interactive comparison needs JavaScript; the evolution timeline reads fine without it.