Updated on 2025-05-29 GMT+08:00

GS_USER

GS_USER displays information about database users. By default, only the initial user and users with the sysadmin attribute can view the information. Other users can view the information only after being granted with permissions.

Table 1 GS_USER columns

Name

Type

Description

usename

name

Username.

usesysid

oid

User ID.

usecreatedb

Boolean

Specifies whether a user has the permissions to create databases.

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

usesuper

Boolean

Specifies whether the user is the initial system administrator with the highest permissions.

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

usecatupd

Boolean

Specifies whether the user can directly update system catalogs. Only the initial system administrator whose usesysid is 10 has this permission. This permission is unavailable for other users.

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

userepl

Boolean

Specifies whether the user has the permissions to duplicate data streams.

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

passwd

text

Encrypted user password. The value is displayed as ********.

valbegin

timestamp with time zone

Account validity start time. If this column is not set, the value is NULL.

valuntil

timestamp with time zone

Account validity end time. If this column is not set, the value is NULL.

respool

name

Resource pool where the user is in.

parent

oid

Parent user OID.

spacelimit

text

Storage space of the permanent table, in KB.

useconfig

text[]

Default value of runtime configuration items. For details, see setconfig in PG_DB_ROLE_SETTING.

tempspacelimit

text

Storage space of the temporary table, in KB.

spillspacelimit

text

Operator disk flushing space, in KB.

usemonitoradmin

Boolean

Specifies whether the user is a monitor administrator.

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

useoperatoradmin

Boolean

Specifies whether the user is an O&M administrator.

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

usepolicyadmin

Boolean

Specifies whether the user is a security policy administrator.

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