INSERT ... ON CONFLICT UPDATE and RLS

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема INSERT ... ON CONFLICT UPDATE and RLS
Дата
Msg-id CAM3SWZRFwmmk4ZctRb5V_V4nqgZ2wZ7B=HJeArjoDPXv_ModXA@mail.gmail.com
обсуждение исходный текст
Ответы Re: INSERT ... ON CONFLICT UPDATE and RLS  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
The patch that implements INSERT ... ON CONFLICT UPDATE has support
and tests for per-column privileges (which are not relevant to the
IGNORE variant, AFAICT). However, RLS support is another thing
entirely. It has not been properly thought out, and unlike per-column
privileges requires careful consideration, as the correct behavior
isn't obvious.

I've documented the current problems with RLS here:

https://wiki.postgresql.org/wiki/UPSERT#RLS

It's not clear whether or not the auxiliary UPDATE within an INSERT...
ON CONFLICT UPDATE statement should have security quals appended.
Stephen seemed to think that that might not be the best solution [1].
I am not sure. I'd like to learn what other people think.

What is the best way of integrating RLS with ON CONFLICT UPDATE? What
behavior is most consistent with the guarantees of RLS? In particular,
should the implementation append security quals to the auxiliary
UPDATE, or fail sooner?

[1] http://www.postgresql.org/message-id/20141121205926.GK28859@tamriel.snowman.net
-- 
Peter Geoghegan



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: pg_rewind in contrib
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs