Re: [HACKERS] Row Level Security UPDATE Confusion

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [HACKERS] Row Level Security UPDATE Confusion
Дата
Msg-id 20170414115101.GX9812@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: [HACKERS] Row Level Security UPDATE Confusion  (Rod Taylor <rod.taylor@gmail.com>)
Список pgsql-hackers
Rod,

* Rod Taylor (rod.taylor@gmail.com) wrote:
> Then there is a bug in the simpler statement which happily lets you give
> away records.
>
> CREATE POLICY simple_all ON t TO simple USING (value > 0) WITH CHECK (true);
>
> SET session authorization simple;
> SELECT * FROM t;
> UPDATE t SET value = value * -1 WHERE value = 1;
> -- No error and value is -1 at the end.

Hm, that does seem like it's not matching up with the intent, likely
because it's an 'ALL' policy instead of individual policies.

Out of curiosity, is there a particular use-case here that you're
working towards, or just testing it out to see how it works?

Thanks!

Stephen

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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: [HACKERS] Row Level Security UPDATE Confusion
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: [HACKERS] Interval for launching the table sync worker