Re: more RLS oversights - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: more RLS oversights
Date
Msg-id CAEZATCVDqPtNriDdTsEmXR_0t1zs_+7Htw52caPgyb7+yOyxwg@mail.gmail.com
Whole thread Raw
In response to Re: more RLS oversights  (Joe Conway <joe.conway@crunchydata.com>)
Responses Re: more RLS oversights
List pgsql-hackers
On 29 July 2015 at 02:36, Joe Conway <joe.conway@crunchydata.com> wrote:
> On 07/03/2015 10:03 AM, Noah Misch wrote:
>> (6) AlterPolicy() calls InvokeObjectPostAlterHook(PolicyRelationId, ...), but
>> CreatePolicy() and DropPolicy() lack their respective hook invocations.
>
> Patch attached. Actually AlterPolicy() was also missing its hook -- the
> existing InvokeObjectPostAlterHook() was only in rename_policy().
>
> I'm not 100% sure about the hook placement -- would appreciate if
> someone could confirm I got it correct.
>

The CreatePolicy() and AlterPolicy() changes look OK to me, but the
RemovePolicyById() change looks to be unnecessary ---
RemovePolicyById() is called only from doDeletion(), which in turned
is called only from deleteOneObject(), which already invokes the drop
hooks. So ISTM that RemovePolicyById() doesn't need to do anything,
right?

Regards,
Dean



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Don'st start streaming after creating a slot in pg_receivexlog
Next
From: Heikki Linnakangas
Date:
Subject: Re: Don'st start streaming after creating a slot in pg_receivexlog