select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SYSTEM CATALOGS / SYSTEM CATALOGS

The catalog pg_policy stores row-level security policies for tables.

Kind
System catalogs
Columns in this snapshot
8
Definition source
English manual

Columns 8

ColumnTypeDescription / reference
oidoidRow identifier
polnamenameThe name of the policy
polrelidoidThe table to which the policy applies
pg_class.oid
polcmdcharThe command type to which the policy is applied: r for SELECT, a for INSERT, w for UPDATE, d for DELETE, or * for all
polpermissiveboolIs the policy permissive or restrictive?
polrolesoid[]The roles to which the policy is applied; zero means PUBLIC (and normally appears alone in the array)
pg_authid.oid
polqualpg_node_treeThe expression tree to be added to the security barrier qualifications for queries that use the table
polwithcheckpg_node_treeThe expression tree to be added to the WITH CHECK qualifications for queries that attempt to add rows to the table
Column history across versions
Version history 4
  1. PG 13 → 14changed
  2. PG 12 → 13changed
  3. PG 9.6 → 10changed
  4. PG 9.4 → 9.5added

Definition snapshot: english-manuals:d6434ba0a46fcecc3fec5706081… · English manual source