RLS and Table Inheritance - Mailing list pgsql-general

From Sanjay Minni
Subject RLS and Table Inheritance
Date
Msg-id CAMpxBomfErwT=ETjdzrVM9Kys8E3xZ2Lge9kY_SahyOCtX8dCQ@mail.gmail.com
Whole thread Raw
Responses Re: RLS and Table Inheritance
List pgsql-general
Hi,

Do RLS policies defined at the parent, work on the child (in Table inheritance).
At the parent I have a column 'site_id' with an RLS policy that only rows with site_id = current_setting(curr_site_id) would be accessible. 
However the policy defined at the parent does not work for me in inherited tables. Is it intended that way ?
Is there a solution to reflect the RLS policy along the line of inheritance, else i have to redefine the RLS policy at each inherited table (a significant maintenance effort).

While the original post seemed to get a prototype working,  the response says that RLS policy will not be inherited and needs to be reimplemented at each table.

thanks 
Sanjay


pgsql-general by date:

Previous
From: Dominique Devienne
Date:
Subject: Re: Effects of REVOKE SELECT ON ALL TABLES IN SCHEMA pg_catalog FROM PUBLIC
Next
From: Dominique Devienne
Date:
Subject: Re: Backward compat issue with v16 around ROLEs