public inbox for [email protected]
help / color / mirror / Atom feedFrom: Sanjay Minni <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: RLS and Table Inheritance
Date: Thu, 12 Sep 2024 18:49:07 +0530
Message-ID: <CAMpxBomfErwT=ETjdzrVM9Kys8E3xZ2Lge9kY_SahyOCtX8dCQ@mail.gmail.com> (raw)
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).
In another post I see conflicting views on this
https://www.postgresql.org/message-id/[email protected]
.
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
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: RLS and Table Inheritance
In-Reply-To: <CAMpxBomfErwT=ETjdzrVM9Kys8E3xZ2Lge9kY_SahyOCtX8dCQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox