Skip to content
← Catalog atlas / pg_roles

SYSTEM VIEW · System view

pg_roles

The view pg_roles provides access to information about database roles. This is simply a publicly readable view of pg_authid that blanks out the password field.

First seen PG 9.0Last seen PG 19Columns 13

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

Columns PostgreSQL 18

pg_roles
COLUMNTYPEDESCRIPTION
rolname name Role name
rolsuper booleanDocumented as:bool Role has superuser privileges
rolinherit booleanDocumented as:bool Role automatically inherits privileges of roles it is a member of
rolcreaterole booleanDocumented as:bool Role can create more roles
rolcreatedb booleanDocumented as:bool Role can create databases
rolcanlogin booleanDocumented as:bool Role can log in. That is, this role can be given as the initial session authorization identifier
rolreplication booleanDocumented as:bool Role is a replication role. A replication role can initiate replication connections and create and drop replication slots.
rolconnlimit integerDocumented 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 Not the password (always reads as ********)
rolvaliduntil timestamp with time zoneDocumented as:timestamptz Password expiry time (only used for password authentication); null if no expiration
rolbypassrls booleanDocumented as:bool Role bypasses every row-level security policy, see Section 5.9 for more information.
rolconfig text[] Role-specific defaults for run-time configuration variables
oid oid ID of roleReferences:pg_authid.oid

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.

Column evolution matrix

Hover a cell for the column type
PresentAdded / type or attribute changeRemoved
COLUMN9.09.19.29.39.49.59.610111213141516171819
rolname
rolsuper
rolinherit
rolcreaterole
rolcreatedb
rolcatupdate
rolcanlogin
rolconnlimit
rolpassword
rolvaliduntil
rolconfig
oid
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 updates

PostgreSQL 14 ← 13

1 column description updates

PostgreSQL 12 ← 11

1 column description updatesCatalog description updated

PostgreSQL 9.6 ← 9.5

1 column description updates

PostgreSQL 9.5 ← 9.4

+ rolbypassrls− rolcatupdate

PostgreSQL 9.1 ← 9.0

+ rolreplication

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.