Re: "plan should not reference subplan's variable" when using row level security

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: "plan should not reference subplan's variable" when using row level security
Дата
Msg-id 20160224202954.GJ3127@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: "plan should not reference subplan's variable" when using row level security  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Adrian,

* Adrian Klaver (adrian.klaver@aklaver.com) wrote:
> I started to work through this when I realized the
> permissions/attributes of the role test are not shown. This seems to
> be important as the UPDATE example works if you run it immediately
> after:
>
> INSERT INTO b (id, a_id, text) VALUES (1, 1, 'one');

Not sure what you mean- the necessary permissions for the test role are
just the 'GRANT ALL ON ALL TABLES' which is included.

If you run the UPDATE immediately after the INSERT, then it's before
that GRANT and, more importantly, before the 'SET ROLE', meaning that
you're running it as the table owner, and the policy is ignored
(policies are not applied to the owner of the table, unless FORCE RLS is
used).

Thanks!

Stephen

Вложения

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: "plan should not reference subplan's variable" when using row level security
Следующее
От: Adam Guthrie
Дата:
Сообщение: Re: "plan should not reference subplan's variable" when using row level security