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

PG_RLSPOLICIES

PG_RLSPOLICIES displays information about row-level security policies. The initial user and users with the sysadmin attribute can view all policy information. Other users can view only the policy information in their own tables.

Table 1 PG_RLSPOLICIES columns

Name

Type

Description

schemaname

name

Name of the schema of the table object to which a row-level security policy is applied.

tablename

name

Name of the table object to which a row-level security policy is applied.

policyname

name

Name of a row-level security policy.

policypermissive

text

Expression combination mode of a row-level security policy. The options are as follows:

  • PERMISSIVE: permissive policy, which is concatenated using the OR expression.
  • RESTRICTIVE: restrictive policy, which is concatenated using an AND expression.

policyroles

name[]

List of users affected by the row-level security policy. If this parameter is not specified, all users are affected.

policycmd

text

SQL operations affected by a row-level security policy.

policyqual

text

Expression of a row-level security policy.