SYSTEM CATALOGS / SYSTEM CATALOGS
pg_policy
Read PG 18 manual ↗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
| Column | Type | Description / reference |
|---|---|---|
oid | oid | Row identifier |
polname | name | The name of the policy |
polrelid | oid | The table to which the policy applies pg_class.oid |
polcmd | char | 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 | bool | Is the policy permissive or restrictive? |
polroles | oid[] | 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
Version history 4
- PG 13 → 14changed
- PG 12 → 13changed
- PG 9.6 → 10changed
- PG 9.4 → 9.5added
Definition snapshot: english-manuals:d6434ba0a46fcecc3fec5706081… · English manual source