Re: [PATCH] Add reloption for views to enable RLS - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: [PATCH] Add reloption for views to enable RLS
Date
Msg-id 89079505ab53c788100015a964099a32dc2e912c.camel@cybertec.at
Whole thread Raw
In response to Re: [PATCH] Add reloption for views to enable RLS  (Christoph Heiss <christoph.heiss@cybertec.at>)
Responses Re: [PATCH] Add reloption for views to enable RLS
List pgsql-hackers
On Mon, 2022-03-14 at 13:40 +0100, Christoph Heiss wrote:
> On 3/9/22 16:06, Laurenz Albe wrote:
> > This paragraph contains a couple of grammatical errors.
>
> Replaced the two paragraphs with your suggestion, it is indeed easier to 
> read.
> 
> > Also, this:
> > could be written like this (introducing a new variable):
> > 
> >    if (rule->event == CMD_SELECT
> >        && relation->rd_rel->relkind == RELKIND_VIEW
> >        && RelationHasSecurityInvoker(relation))
> >        user_for_check = InvalidOid;
> >    else
> >        user_for_check = relation->rd_rel->relowner;
> > 
> >    setRuleCheckAsUser((Node *) rule->actions, user_for_check);
> >    setRuleCheckAsUser(rule->qual, user_for_check);
> > 
> > This might be easier to read.
> 
> Makes sense, I've changed that. This also seems to be more in line with 
> all the other code.
> While at it I also split the comment alongside it to match, hopefully 
> that makes sense.

The patch is fine from my point of view.

It passes "make check-world".

I'll mark it as "ready for committer".

Yours,
Laurenz Albe




pgsql-hackers by date:

Previous
From: Dipesh Pandit
Date:
Subject: Re: refactoring basebackup.c
Next
From: "Imseih (AWS), Sami"
Date:
Subject: Re: Add index scan progress to pg_stat_progress_vacuum