git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: ecc2d16) | patch
RLS: Keep deny policy when only restrictive exist
Mon, 3 Aug 2015 19:32:49 +0000 (15:32 -0400)
Mon, 3 Aug 2015 19:32:49 +0000 (15:32 -0400)
commit dee0200f0276c0f9da930a2c926f90f5615f2d64
RLS: Keep deny policy when only restrictive exist

Only remove the default deny policy when a permissive policy exists
(either from the hook or defined by the user). If only restrictive
policies exist then no rows will be visible, as restrictive policies
shouldn't make rows visible. To address this requirement, a single
"USING (true)" permissive policy can be created.

Update the test_rls_hooks regression tests to create the necessary
"USING (true)" permissive policy.

Back-patch to 9.5 where RLS was added.

Per discussion with Dean.
src/backend/rewrite/rowsecurity.c diff | blob | blame | history
src/test/modules/test_rls_hooks/expected/test_rls_hooks.out diff | blob | blame | history
src/test/modules/test_rls_hooks/sql/test_rls_hooks.sql diff | blob | blame | history
src/test/modules/test_rls_hooks/test_rls_hooks.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /