↑↓ select ↵ open ⌫ change scope Open full search

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

System Catalogs / System views

The view pg_roles provides access to information about database roles.

Reading PG 18current·documented in 22 of 24 versions, 8.1 to 20

Kind
System views
Columns in this snapshot
13
Definition source
English manual
Metadata snapshot
18.6

Columns 13

As listed in the PostgreSQL 18 manual.

ColumnTypeDescription / reference
rolnamenameRole name
rolsuperboolRole has superuser privileges
rolinheritboolRole automatically inherits privileges of roles it is a member of
rolcreateroleboolRole can create more roles
rolcreatedbboolRole can create databases
rolcanloginboolRole can log in. That is, this role can be given as the initial session authorization identifier
rolreplicationboolRole is a replication role. A replication role can initiate replication connections and create and drop replication slots.
rolconnlimitint4For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit.
rolpasswordtextNot the password (always reads as ********)
rolvaliduntiltimestamptzPassword expiry time (only used for password authentication); null if no expiration
rolbypassrlsboolRole bypasses every row-level security policy, see Section 5.9 for more information.
rolconfigtext[]Role-specific defaults for run-time configuration variables
oidoidID of role
pg_authid.oid
Column history across versions
Version history 11
  1. 18 → 19 reworded
  2. 16 → 17 reworded
  3. 13 → 14 reworded
  4. 11 → 12 reworded
  5. 9.5 → 9.6 reworded
  6. 9.4 → 9.5 changed
  7. 9.0 → 9.1 changed
  8. 8.4 → 9.0 reworded
  9. 8.2 → 8.3 reworded
  10. 8.1 → 8.2 reworded
  11. 8.0 → 8.1 added

Definition snapshot: english-manuals:77717f087b36247c1a889f0b3de… · English manual source