rls-reference
Installation
SKILL.md
rls-reference
Overview
Postgres Row-Level Security (RLS) lets the database itself enforce per-tenant
row visibility, independent of the application code. It is the canonical
defence-in-depth layer for pool / horizontally-partitioned tenancy models - even
if the application forgets to add a WHERE tenant_id = ? filter, the database
refuses to return another tenant's rows.
Per postgresql.org/docs/current/ddl-rowsecurity.html,
RLS "restricts which rows users can access based on per-user policies." Unlike
standard SQL GRANT / REVOKE privileges which act on whole tables, RLS
controls row visibility and modification per role.