Updated on 2023-10-23 GMT+08:00

PG_SHADOW

PG_SHADOW displays properties of all roles that are marked as rolcanlogin in PG_AUTHID.

The name stems from the fact that this view 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 column.

Table 1 PG_SHADOW columns

Name

Type

Reference

Description

usename

name

PG_AUTHID.rolname

Indicates the username.

usesysid

oid

PG_AUTHID.oid

Indicates the user ID

usecreatedb

boolean

-

Indicates that the user can create databases.

usesuper

boolean

-

Indicates that the user is an administrator.

usecatupd

boolean

-

Indicates that the user can update views. Even the system administrator cannot do this unless this column is true.

userepl

boolean

-

Indicates that the user can initiate streaming replication and put the system in and out of backup mode.

passwd

text

-

Indicates the password (possibly encrypted); null if none. See PG_AUTHID for details about how encrypted passwords are stored.

valbegin

timestamp with time zone

-

Indicates the start time for account validity (null if no start time).

valuntil

timestamp with time zone

-

Indicates the end time for account validity (null if no end time)

respool

name

-

Indicates the resource pool used by the user.

parent

oid

-

Indicates the parent resource pool.

spacelimit

text

-

Indicates the storage space of the permanent table.

tempspacelimit

text

-

Indicates the storage space of the temporary table.

spillspacelimit

text

-

Indicates the operator disk flushing space.

useconfig

text[ ]

-

Indicates the session defaults for runtime configuration variables.

usemonitoradmin

boolean

-

Indicates whether the user is a monitor administrator.

  • t (true): yes
  • f (false): no

useoperatoradmin

boolean

-

Indicates whether the user is an O&M administrator.

  • t (true): yes
  • f (false): no

usepolicyadmin

boolean

-

Indicates whether the user is a security policy administrator.

  • t (true): yes
  • f (false): no