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.
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
- view
- lang
- en
- measured attributes
- true
- metadata release
- 18.6
- runtime columns
- rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolconnlimit, rolpassword, rolvaliduntil, rolbypassrls, rolconfig, oid
- runtime verified
- false
- source
- english-manual
Definition PG 18
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.
Catalog columns
| Column | Type | Nullability | Description |
|---|---|---|---|
| rolname | name | Nullable | Role name |
| rolsuper | bool | Nullable | Role has superuser privileges |
| rolinherit | bool | Nullable | Role automatically inherits privileges of roles it is a member of |
| rolcreaterole | bool | Nullable | Role can create more roles |
| rolcreatedb | bool | Nullable | Role can create databases |
| rolcanlogin | bool | Nullable | Role can log in. That is, this role can be given as the initial session authorization identifier |
| rolreplication | bool | Nullable | Role is a replication role. A replication role can initiate replication connections and create and drop replication slots. |
| rolconnlimit | int4 | Nullable | For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit. |
| rolpassword | text | Nullable | Not the password (always reads as ********) |
| rolvaliduntil | timestamptz | Nullable | Password expiry time (only used for password authentication); null if no expiration |
| rolbypassrls | bool | Nullable | Role bypasses every row-level security policy, see Section 5.9 for more information. |
| rolconfig | text[] | Nullable | Role-specific defaults for run-time configuration variables |
| oid | oid | Nullable | ID of role |
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · catalog-bilingual-repair:30912e8165d949b9420f58d1a17e70cb6e6bd9fdf63106e63af168e99d856730
Text language: en · catalog-bilingual-repair:30912e8165d949b9420f58d1a17e70cb6e6bd9fdf63106e63af168e99d856730