Table the policy applies to
Policy name
OptionalusingRows visible to the command, as a where object — the same syntax a query
takes, compiled for the target dialect:
{ using: { tenantId: { $eq: literalExpr('current_setting(\'app.tenant\')') } } }
A raw SQL string is still accepted but deprecated.
OptionalwithRows the command may write, as a where object. A raw SQL string is still
accepted but deprecated.
OptionalforCommand the policy applies to
OptionaltoRoles the policy applies to
A row-level security policy: who it applies to, which command, and the expressions that decide visibility (
using) and writability (withCheck).