Re: RLS open items are vague and unactionable

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: RLS open items are vague and unactionable
Дата
Msg-id CA+TgmoaQn6Hv=vAKNFRQdg6d-=8O0sqhWORcTShJ-ZQB0btj-Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: RLS open items are vague and unactionable  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Sep 11, 2015 at 10:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Dean Rasheed <dean.a.rasheed@gmail.com> writes:
>> Yeah, we had a similar discussion regarding UPDATE USING policies and
>> ON CONFLICT UPDATE clauses. I think the argument against filtering is
>> that the rows returned would then be misleading about what was
>> actually updated.
>
> It seems to me that it would be a horribly bad idea to allow RLS to act
> in such a way that rows could be updated and then not shown in RETURNING.
>
> However, I don't see why UPDATE/DELETE with RETURNING couldn't be
> restricted according to *both* the UPDATE and SELECT policies,
> ie if there's RETURNING then you can't update a row you could not
> have selected.  Note this would be a nothing-happens result not a
> throw-error result, else you still leak info about the existence of
> the row.

Yes, this seems like an entirely reasonable way forward.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Do Layered Views/Relations Preserve Sort Order ?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: RLS open items are vague and unactionable