Re: Row level security policy

From: Mark Phillips <mphillips(at)mophilly(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Row level security policy
Date: 2024-11-14 12:04:00
Message-ID: 8DC107DB-1FE0-45F2-98D5-554B8EFAA990@mophilly.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you for clarifying this. I missed that even though it is there in the second paragraph.
- Mark, out and about.

> On Nov 14, 2024, at 1:57 AM, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
> On Wed, 2024-11-13 at 17:33 -0800, Mark Phillips wrote:
>> Given a database table with one policy statement FOR SELECT applied, it is necessary
>> to apply additional policy statements for insert, update, and delete operations?
>>
>> My testing indicates that this is case but I haven’t found an explanation of this
>> requirement in the documentation.
>
> https://www.postgresql.org/docs/current/ddl-rowsecurity.html says:
>
> When row security is enabled on a table (with ALTER TABLE ... ENABLE ROW LEVEL SECURITY),
> all normal access to the table for selecting rows or modifying rows must be allowed by
> a row security policy.
>
> So if you only have a policy for SELECT, that's all you are allowed to do.
>
> Yours,
> Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2024-11-14 14:02:48 Re: DB wal file disabled --_Query
Previous Message Laurenz Albe 2024-11-14 09:57:38 Re: Row level security policy