Re: [HACKERS] RLS in CTE incorrect permission failure

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: [HACKERS] RLS in CTE incorrect permission failure
Дата
Msg-id CAHz80e6XVB0CcAtBcHZ7PJDCPD=eXTmOWhqe_BGs7HR0tauEng@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] RLS in CTE incorrect permission failure  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers


On Wed, Jun 21, 2017 at 7:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
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.

Indeed, that works as expected.

Sorry for the noise.
 

--
Rod Taylor

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] [COMMITTERS] pgsql: Restart logical replicationlauncher when killed
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Optional message to user when terminating/cancelling backend