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

GS_ROLES

GS_ROLES displays information about database roles. The initial user and users with the SYSADMIN or CREATEROLE attribute can view information about all roles. Other users can view only their own information.

Table 1 GS_ROLES columns

Name

Type

Reference

Description

rolname

name

N/A

Role name.

rolsuper

boolean

N/A

Specifies whether a role is the initial system administrator with the highest permissions.

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

rolinherit

boolean

N/A

Specifies whether the role inherits the permissions for this type of roles.

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

rolcreaterole

boolean

N/A

Specifies whether the role can create other roles.

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

rolcreatedb

boolean

N/A

Specifies whether the role can create databases.

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

rolcatupdate

boolean

N/A

Specifies whether the role can update system catalogs directly. 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.

rolcanlogin

boolean

N/A

Specifies whether the role can log in to the database.

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

rolreplication

boolean

N/A

Specifies whether the role can be replicated.

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

rolauditadmin

boolean

N/A

Specifies whether the role is an audit administrator.

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

rolsystemadmin

boolean

N/A

Specifies whether the role is a system administrator.

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

rolconnlimit

integer

N/A

Sets the maximum number of concurrent connections that this role can initiate if this role can log in. The value –1 indicates no limit.

rolpassword

text

N/A

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

rolvalidbegin

timestamp with time zone

N/A

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

rolvaliduntil

timestamp with time zone

N/A

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

rolrespool

name

N/A

Resource pool that a user can use.

rolparentid

oid

PG_AUTHID.rolparentid

OID of a group user to which the user belongs.

roltabspace

text

N/A

Storage space of the user permanent table, in KB.

rolconfig

text[]

setconfig in PG_DB_ROLE_SETTING

Default value of runtime configuration items.

oid

oid

oid in PG_AUTHID

Role ID.

roluseft

boolean

PG_AUTHID.roluseft

Specifies whether the role can perform operations on foreign tables.

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

rolkind

"char"

N/A

Role type.

  • n: common user, that is, non-permanent user.
  • p: permanent user.

roltempspace

text

N/A

Storage space of the user temporary table, in KB.

rolspillspace

text

N/A

Operator disk spill space of the user, in KB.

rolmonitoradmin

boolean

N/A

Specifies whether the role is a monitor administrator.

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

roloperatoradmin

boolean

N/A

Specifies whether the role is an O&M administrator.

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

rolpolicyadmin

boolean

N/A

Specifies whether the role is a security policy administrator.

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