Cloud

pg_shadow

The pg_shadow system catalog provides a superuser-only view of database users with unmasked passwords. It mimics the pg_shadow PostgreSQL system view.

This table is only accessible to superusers. For a publicly readable view, use pg_user or pg_roles.

Columns

The following columns are available for querying in pg_shadow:

Column Type Description

usename

text

User name

usesysid

bigint

User system ID (role OID)

usecreatedb

bool

Whether the user can create databases

usesuper

bool

Whether the user has superuser privileges

userepl

bool

Whether the user has replication privileges

usebypassrls

bool

Whether the user bypasses row-level security policies

passwd

text

Encrypted password (visible to superusers)

valuntil

timestamptz

Password expiration time (NULL if no expiration)

useconfig

text

Session defaults for this user

Examples

SELECT usename, usesuper FROM pg_shadow;