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

PG_RLSPOLICY

PG_RLSPOLICY records row-level security policies.

Table 1 PG_RLSPOLICY columns

Name

Type

Description

oid

oid

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

polname

name

Name of the row-level security policy.

polrelid

oid

OID of the table object on which the row-level security policy takes effect.

polcmd

"char"

SQL operations affected by the row-level security policy.

polpermissive

Boolean

Attribute of the row-level security policy.

  • t: OR condition concatenation of expressions.
  • f: AND condition concatenation of expressions.

polroles

oid[]

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

polqual

pg_node_tree

Expression of the row-level security policy.