↑↓ select↵ open⌫ change scopeOpen full search

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

Wiki / System Catalogs

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

ColumnTypeNullabilityDescription
usenamenameNullableUser name
usesysidoidNullableID of this user
usecreatedbboolNullableUser can create databases
usesuperboolNullableUser is a superuser
usereplboolNullableUser can initiate streaming replication and put the system in and out of backup mode.
usebypassrlsboolNullableUser bypasses every row-level security policy, see Section 5.9 for more information.
passwdtextNullableEncrypted password; null if none. See pg_authid for details of how encrypted passwords are stored.
valuntiltimestamptzNullablePassword expiry time (only used for password authentication)
useconfigtext[]NullableSession 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