Cloud

pg_user

The pg_user system catalog provides a publicly readable view of database users. It mimics the pg_user PostgreSQL system view.

For a view that includes unmasked passwords (superuser only), use pg_shadow.

Columns

The following columns are available for querying in pg_user:

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

Password (masked as **)

valuntil

timestamptz

Password expiration time (NULL if no expiration)

useconfig

text

Session defaults for this user

Examples

SELECT usename, usesuper, usecreatedb FROM pg_user;