Row-level security
Row security policies (CREATE POLICY) filtering rows per role, including restrictive policies. Introduced in PostgreSQL 9.5.
Versions
- PostgreSQL 20 · worked-on · improved · moderate
- PostgreSQL 19 · worked-on · improved · moderate
- PostgreSQL 18 · shipped · improved · minor · 4 commits · +187 / -66 lines
- PostgreSQL 17 · worked-on · improved · moderate
Threads
- COPY FROM with RLS
- ORCE ROW LEVEL SECURITY makes ADD/VALIDATE FOREIGN KEY skip rows hidden from the owner (RI_Initial_Check)
- Making the ENUM operators LEAKPROOF
- equalPolicy() doesn't compare the permissive flag
- Seeking Guidance on Fixing the Cyclic RLS Policy / Infinite Recursion Bug in PostgreSQL
- minor error message enhance: print RLS policy name when only one permissive policy exists
- let ALTER COLUMN SET DATA TYPE cope with POLICY dependency
- BUG #19359: Row level security: Upserts require insert policies in the update path
- Docs and tests for RLS policies applied by command type
- CREATE POLICY IF NOT EXISTS
- Per-role disabling of LEAKPROOF requirements for row-level security?
- BUG #19015: insert-returning failure: stable function in select policy doesn't see before-insert trigger change
- Remove redundant comment regarding RelationBuildRowSecurity in relcache.c
- No information about the internal implementation for RLS
- BUG #18941: PostgreSQL planner does not select a multicolumn btree_gin index under RLS
- Unify a recently-added inconsisnt message
- pg_dump, pg_dumpall, pg_restore: Add --no-policies option
- revamp row-security tracking
- BUG #18782: Inconsistent behaviour with triggers and row level security - depends on prior number of inserts
- psql: Add leakproof field to \dAo+ meta-command results
- fir for row level security
- Restrict EXPLAIN (ANALYZE) for RLS and security_barrier views
- can we mark upper/lower/textlike functions leakproof?
- Restrictive combination of GRANT and POLICY
- PATCH: Add query for operators unusable with RLS to documentation
- BUG #18521: RLS should report when non-select operation is refused
- Proposal: Introduce row-level security templates
- Postgres policy exists bug
- Bug: RLS policy FOR SELECT is used to check new rows
- BUG #17972: Assert failed in pull_varattnos_walker() for view with subquery and security qual
- RLS makes COPY TO process child tables
- Row Level Security Execution within the SQL Evaluation Pipeline
- If a row-level security policy contains a set returning function, pg_dump returns an incorrect serialization of that policy if the return type of the function was altered
- BUG #17549: wrong index scan plan with RLS
- Improving RLS planning
- policies with security definer option for allowing inline optimization
- Memory leak in RelationBuildRowSecurity
- pg_dump No comment for policy
- BUG #16006: Update queries fail on a table having any policy with a function that takes a whole-row var as arg
- More obvious clarification is needed about how RLS interacts with views
- BUG #15708: RLS 'using' running as wrong user when called from a view
- Row Level Security − leakproof-ness and performance implications
- Incorrect description of the WITH CHECK in the row security can lead to the security issue
- RLS does not itself expand to views, unless you set a right owner - worth mentioning?
- BUG #15107: No good plans when row-level security is enabled
- Row Level Security Bug ?
- Row Level Security Documentation
- BUG #14833: Row security policies using session variable can be circumvented
- Row security policies using session variable can be circumvented
- Row level security (RLS) for updatable views
- RLS in CTE incorrect permission failure
- BUG #14682: row level security not work with partitioned table
- Add support for restrictive RLS policies