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

PG_ROLES

PG_ROLES provides information about database roles. Initialization users and users with the sysadmin or createrole attribute can view information about all roles. Other users can view only their own information.

Table 1 PG_ROLES columns

Name

Type

Reference

Description

rolname

name

-

Role name

rolsuper

boolean

-

Whether the role is the initial system administrator with the highest permission

rolinherit

boolean

-

Whether the role inherits the permissions for this type of roles

rolcreaterole

boolean

-

Whether the role can create other roles

rolcreatedb

boolean

-

Whether the role can create databases

rolcatupdate

boolean

-

Whether the role can update system tables directly. Only the initial system administrator whose usesysid is 10 has this permission. It is unavailable for other users.

rolcanlogin

boolean

-

Whether the role can log in to the database

rolreplication

boolean

-

Whether the role can be replicated

rolauditadmin

boolean

-

Whether the role is an audit system administrator

rolsystemadmin

boolean

-

Whether the role is a system administrator

rolconnlimit

integer

-

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

-

Not the password (always reads as ********)

rolvalidbegin

timestamp with time zone

-

Account validity period start time; null if no start time

rolvaliduntil

timestamp with time zone

-

Account expiry time; null if no expiration

rolrespool

name

-

Resource pool that a user can use

rolparentid

oid

PG_AUTHID.rolparentid

OID of a group user to which the user belongs

roltabspace

text

-

Storage space of the user permanent table

roltempspace

text

-

Storage space of the user temporary table, in KB

rolspillspace

text

-

Operator disk spill space of the user, in KB

rolconfig

text[]

-

Session defaults for runtime configuration variables

oid

oid

PG_AUTHID.oid

Role ID

roluseft

boolean

PG_AUTHID.roluseft

Whether the role can perform operations on foreign tables

rolkind

"char"

-

Role type

nodegroup

name

-

Unsupported currently

rolmonitoradmin

boolean

-

Whether the role is a monitor administrator

roloperatoradmin

boolean

-

Whether the role is an O&M administrator

rolpolicyadmin

boolean

-

Whether the role is a security policy administrator