Re: Row level security policy

2024-11-14 Thread Mark Phillips
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 wrote: > > On Wed, 2024-11-13 at 17:33 -0800, Mark Phillips wrote: >> Given a database table with one policy statement FOR SELECT ap

Re: Row level security policy

2024-11-14 Thread Laurenz Albe
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

Re: Row level security policy

2024-11-13 Thread Mark Phillips
Well, things did not work as I expected, which means there is more for me to learn. I am new to RLS usage. I want to implement this in a proper manner, so is the behavior described below correct? Are there other aspects of this I need to study? Thanks, in advance. Advice and links to articles a

Re: Row level security policy

2024-11-13 Thread Mark Phillips
Thank you. I will revisit my test cases to be sure I have the use cases covered. - Mark, out and about.On Nov 13, 2024, at 5:36 PM, David G. Johnston wrote:On Wednesday, November 13, 2024, Mark Phillips wrote:Given a database table with one policy statement FOR SELECT app

Re: Row level security policy

2024-11-13 Thread David G. Johnston
On Wednesday, November 13, 2024, 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? > It isn’t necessary but most conventional use cases would involve est

Row level security policy

2024-11-13 Thread Mark Phillips
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. - Mark

Re: Row Level Security Policy Name in Error Message

2023-03-06 Thread Daniel Gustafsson
> On 6 Mar 2023, at 01:18, Louis Tian wrote: > Wondering whether there is a way to get the row-level security policy name in > the error message when it's violated. > I am only getting a more generic error message like this. > ERROR: new row violates row-level secur

Row Level Security Policy Name in Error Message

2023-03-06 Thread Louis Tian
Hi All, Wondering whether there is a way to get the row-level security policy name in the error message when it's violated. I am only getting a more generic error message like this. ERROR: new row violates row-level security policy for table "table_name" Thanks for your help.

Re: Update row attribute that is part of row level security policy using_expression

2019-05-03 Thread Adrian Klaver
+   1 | t (1 row) --> OK --now I want to 'deactivate' the active row update t1 set active=false where id=1; ERROR:  new row violates row-level security policy for table "t1" --> I want to be able to do this. My question is: How can user b read j

Update row attribute that is part of row level security policy using_expression

2019-05-03 Thread Saupe Stefan
g (active); alter table t1 enable row level security; grant all on t1 to b; select * from t1; id | active + 1 | t 2 | f (2 rows) --> OK --Now connect as the application user b \c postgres b; select * from t1; id | active + 1 | t (1 row) --> OK --now I want to '