Re: [GENERAL] Recursive row level security policy

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [GENERAL] Recursive row level security policy
Дата
Msg-id 20161217190427.GQ18360@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: [GENERAL] Recursive row level security policy  (Simon Charette <charette.s@gmail.com>)
Список pgsql-general
Simon,

* Simon Charette (charette.s@gmail.com) wrote:
> Ahh makes sense, thanks for the explanation!
>
> I was assuming USING() clauses were executed in the context of the
> owner of the policy, by passing RLS.

No, as with views, a USING() clause is executed as the caller not the
owner of the relation.  Security Definer functions can be used to
execute actions in the policy as another user.

Note that RLS won't be applied for the table owner either (unless the
relation has 'FORCE RLS' enabled for it), so you don't have to have
functions which are run as superuser to use the approach Joe
recommended.

Thanks!

Stephen

Вложения

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