Re: [HACKERS] RLS in CTE incorrect permission failure - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] RLS in CTE incorrect permission failure
Date
Msg-id 22863.1498088811@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] RLS in CTE incorrect permission failure  (Rod Taylor <rod.taylor@gmail.com>)
Responses Re: [HACKERS] RLS in CTE incorrect permission failure  (Rod Taylor <rod.taylor@gmail.com>)
List pgsql-hackers
Rod Taylor <rod.taylor@gmail.com> writes:
> In the attached script, the second insert into t2 (as part of the CTE)
> should succeed.

No, I don't think so.  You declared the check function as STABLE which
means it is confined to seeing the same snapshot as the surrounding query.
So it can't see anything inserted by that query.

Possibly it'd work as you wish with a VOLATILE function.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Restart logical replication launcher when killed
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Restart logical replicationlauncher when killed