Re: INSERT ... ON CONFLICT UPDATE and RLS - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: INSERT ... ON CONFLICT UPDATE and RLS
Date
Msg-id CAEZATCVfn+BUKmWi+tLyi=jHK=WAUYi6zG7c5-xODCOOkTiC_A@mail.gmail.com
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT UPDATE and RLS  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On 12 January 2015 at 14:24, Stephen Frost <sfrost@snowman.net> wrote:
> Looking at the regression tests a bit though, I notice that this removes
> the lower-level LockRows..  There had been much discussion about that
> last spring which I believe you were a part of..?  I specifically recall
> discussing it with Craig, at least.
>

Ah, yes you're right. Looking back over that discussion it shouldn't
be removing those lower-level LockRows. I was a bit aggressive with my
change to the rowmark preprocessing -- the first loop applies to
requested locks, like SELECT .. FOR UPDATE, so it shouldn't be messing
with that, presecurity.c handles that fine. It's only the second loop
that needs to be taught about RTEs with security quals that will
become subqueries.

Here's an updated patch, that passes with the original regression test results.

Regards,
Dean

Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: replicating DROP commands across servers
Next
From: Robert Haas
Date:
Subject: Re: parallel mode and parallel contexts