System Catalogs / System catalogs
pg_policy
Read the PG 18 manualThe catalog pg_policy stores row-level security policies for tables.
Reading PG 18current·documented in 13 of 24 versions, 9.5 to 20
- Kind
- System catalogs
- Columns in this snapshot
- 8
- Definition source
- English manual
- Metadata snapshot
- 18.6
Columns 8
As listed in the PostgreSQL 18 manual.
| Column | Type | Description / reference |
|---|---|---|
oid | oidNOT NULL | Row identifier |
polname | nameNOT NULL | The name of the policy |
polrelid | oidNOT NULL | The table to which the policy applies pg_class.oid |
polcmd | charNOT NULL | The command type to which the policy is applied: r for SELECT, a for INSERT, w for UPDATE, d for DELETE, or * for all |
polpermissive | boolNOT NULL | Is the policy permissive or restrictive? |
polroles | oid[]NOT NULL | The roles to which the policy is applied; zero means PUBLIC (and normally appears alone in the array) pg_authid.oid |
polqual | pg_node_tree | The expression tree to be added to the security barrier qualifications for queries that use the table |
polwithcheck | pg_node_tree | The expression tree to be added to the WITH CHECK qualifications for queries that attempt to add rows to the table |
Column history across versions
Definition snapshot: english-manuals:309d32f7e91f87650377ac3ce54… · English manual source