Re: [PATCH] Add reloption for views to enable RLS

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: [PATCH] Add reloption for views to enable RLS
Дата
Msg-id 89079505ab53c788100015a964099a32dc2e912c.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: [PATCH] Add reloption for views to enable RLS  (Christoph Heiss <christoph.heiss@cybertec.at>)
Ответы Re: [PATCH] Add reloption for views to enable RLS  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Dipesh Pandit
Дата:
Сообщение: Re: refactoring basebackup.c
Следующее
От: "Imseih (AWS), Sami"
Дата:
Сообщение: Re: Add index scan progress to pg_stat_progress_vacuum