RLS with check option - surprised design

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема RLS with check option - surprised design
Дата
Msg-id CAFj8pRBbD-AiWuJ6vLZA7KHYvtd_E23LYfRwMgJjtv90W=Ym7Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: RLS with check option - surprised design
Список pgsql-hackers
Hello

I am playing with RLS. I created simple table

table_data (inserted_by text, v integer);

I created two policies

create policy p1 on data with check (inserted_by = session_user);
create policy p2 on data with check (v between 10 and 1000);

I was surprised so p2 effectively disables p1;

next a message:

ERROR:  new row violates WITH CHECK OPTION for "data"
DETAIL:  Failing row contains (2014-10-05 12:28:30.79652, petr, 1000).

Doesn't inform about broken policy.

Regards

Pavel

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

Предыдущее
От: Ali Akbar
Дата:
Сообщение: Re: Add generate_series(numeric, numeric)
Следующее
От: Ali Akbar
Дата:
Сообщение: Re: Add generate_series(numeric, numeric)