Updated on 2024-06-03 GMT+08:00

PG_USER_STATUS

PG_USER_STATUS records the states of users who access the database. This system catalog is accessible only to users with the system administrator permission.

Table 1 PG_USER_STATUS columns

Name

Type

Description

oid

oid

Row identifier (hidden attribute, which must be specified).

roloid

oid

ID of a role

failcount

integer

Number of failed attempts

locktime

timestamp with time zone

By default, the creation date of the role is displayed. If the role is locked by the administrator or the role is locked because the number of login failures exceeds the threshold, the date when the role is locked is displayed.

rolstatus

smallint

Role state.
  • 0: normal.
  • 1: The role is locked for a specific period of time because the failed login attempts exceed the threshold.
  • 2: The role is locked by the administrator.

permspace

bigint

Size of the permanent table storage space used by a role.

tempspace

bigint

Size of the temporary table storage space used by a role.

passwordexpired

smallint

Specifies whether a password is valid.

  • 0: The password is valid.
  • 1: The password is invalid.