• Stephen Frost's avatar
    RLS: Keep deny policy when only restrictive exist · dee0200f
    Stephen Frost authored
    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.
    dee0200f
test_rls_hooks.c 4.76 KB