pg_shadow
The view pg_shadow exists for backwards compatibility: it emulates a catalog that existed in PostgreSQL before version 8.1. It shows properties of all roles that are marked as rolcanlogin in pg_authid. The name stems from the fact that this table should not be readable by the public since it contains passwords. pg_user is a publicly readable view on pg_shadow 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
- usename, usesysid, usecreatedb, usesuper, userepl, usebypassrls, passwd, valuntil, useconfig
- runtime verified
- false
- source
- english-manual
Definition PG 18
The view pg_shadow exists for backwards compatibility: it emulates a catalog that existed in PostgreSQL before version 8.1. It shows properties of all roles that are marked as rolcanlogin in pg_authid. The name stems from the fact that this table should not be readable by the public since it contains passwords. pg_user is a publicly readable view on pg_shadow that blanks out the password field.
Catalog columns
| Column | Type | Nullability | Description |
|---|---|---|---|
| usename | name | Nullable | User name |
| usesysid | oid | Nullable | ID of this user |
| usecreatedb | bool | Nullable | User can create databases |
| usesuper | bool | Nullable | User is a superuser |
| userepl | bool | Nullable | User can initiate streaming replication and put the system in and out of backup mode. |
| usebypassrls | bool | Nullable | User bypasses every row-level security policy, see Section 5.9 for more information. |
| passwd | text | Nullable | Encrypted password; null if none. See pg_authid for details of how encrypted passwords are stored. |
| valuntil | timestamptz | Nullable | Password expiry time (only used for password authentication) |
| useconfig | text[] | Nullable | Session defaults for run-time configuration variables |
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · catalog-bilingual-repair:db876a96e9040881162b8be9463770d0935ff35daa674ddd50773f7647e87685
Text language: en · catalog-bilingual-repair:db876a96e9040881162b8be9463770d0935ff35daa674ddd50773f7647e87685