Skip to content
← Catalog atlas / pg_policies

SYSTEM VIEW · System view

pg_policies

The view pg_policies provides access to useful information about each row-level security policy in the database.

First seen PG 9.5Last seen PG 19Columns 8

Checked column by column against a PostgreSQL 18.6 instance · Raw measurement record ↗

Columns PostgreSQL 18

pg_policies
COLUMNTYPEDESCRIPTION
schemaname name Name of schema containing table policy is onReferences:pg_namespace.nspname
tablename name Name of table policy is onReferences:pg_class.relname
policyname name Name of policyReferences:pg_policy.polname
permissive text Is the policy permissive or restrictive?
roles name[] The roles to which this policy applies
cmd text The command type to which the policy is applied
qual text The expression added to the security barrier qualifications for queries that this policy applies to
with_check text The expression added to the WITH CHECK qualifications for queries that attempt to add rows to this table

Columns marked "implicit" are not included in SELECT *; some early statistics views are completed from same-version source, and the extra provenance is shown in the column description.

Column evolution matrix

Hover a cell for the column type
PresentAdded / type or attribute changeRemoved
COLUMN9.09.19.29.39.49.59.610111213141516171819
schemaname
tablename
policyname
roles
cmd
qual
with_check
permissive

9.0 is the coverage baseline; a column already present in the baseline is not marked as added. The matrix aligns columns by name, so a rename appears as the old column removed and a new column added.

Evolution timeline

Changes between adjacent majors

PostgreSQL 10 ← 9.6

+ permissive

PostgreSQL 9.5 ← 9.4Catalog added

+ schemaname+ tablename+ policyname+ roles+ cmd+ qual+ with_check

Compare any two versions

Pick two versions to see added, removed, and retyped columns. The interactive comparison needs JavaScript; the evolution timeline reads fine without it.