Skip to content

Policy

Defines a row-level security policy on a table

Properties

Property Type Required Description
name string yes The policy name, unique within its table.
restrictive boolean Create the policy AS RESTRICTIVE. A row must pass every restrictive policy, in addition to at least one permissive policy. The default is PERMISSIVE.
command ALL | SELECT | INSERT | UPDATE | DELETE The command the policy applies to. The default is ALL.
roles array of string The roles the policy applies to. The default is PUBLIC. Minimum items: 1.
using string The expression that selects the existing rows the policy makes visible or lets a command change.
with_check string The expression that new or updated rows must satisfy.
comment string An optional comment about the policy.

No other properties are accepted.


Source: schemata/policy.yml · Resolved JSON Schema: policy.json