Re: Row level security policy - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Row level security policy
Date
Msg-id e02436cddbd2f628062f12365c9868b5ea124737.camel@cybertec.at
Whole thread Raw
In response to Row level security policy  (Mark Phillips <mphillips@mophilly.com>)
Responses Re: Row level security policy
List pgsql-general
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



pgsql-general by date:

Previous
From: jayakumar s
Date:
Subject: Re: DB wal file disabled --_Query
Next
From: Mark Phillips
Date:
Subject: Re: Row level security policy