pg_policies
The view pg_policies provides access to useful information about each row-level security policy in the database.
English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- kind
- view
- lang
- en
- measured attributes
- true
- metadata release
- 18.6
- runtime columns
- schemaname, tablename, policyname, permissive, roles, cmd, qual, with_check
- runtime verified
- false
- source
- english-manual
Definition PG 18
The view pg_policies provides access to useful information about each row-level security policy in the database.
Catalog columns
| Column | Type | Nullability | Description |
|---|---|---|---|
| schemaname | name | Nullable | Name of schema containing table policy is on |
| tablename | name | Nullable | Name of table policy is on |
| policyname | name | Nullable | Name of policy |
| permissive | text | Nullable | Is the policy permissive or restrictive? |
| roles | name[] | Nullable | The roles to which this policy applies |
| cmd | text | Nullable | The command type to which the policy is applied |
| qual | text | Nullable | The expression added to the security barrier qualifications for queries that this policy applies to |
| with_check | text | Nullable | The expression added to the WITH CHECK qualifications for queries that attempt to add rows to this table |
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · catalog-bilingual-repair:afd557526329cb3dc76f8f68e8417a05a41519ffb06969987eecc466509bd335
Text language: en · catalog-bilingual-repair:afd557526329cb3dc76f8f68e8417a05a41519ffb06969987eecc466509bd335