pgsql: Doc: fix oversimplified example for CREATE POLICY.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Doc: fix oversimplified example for CREATE POLICY.
Дата
Msg-id E1fkAVd-0005hh-0x@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Doc: fix oversimplified example for CREATE POLICY.

As written, this policy constrained only the post-image not the pre-image
of rows, meaning that users could delete other users' rows or take
ownership of such rows, contrary to what the docs claimed would happen.
We need two separate policies to achieve the documented effect.

While at it, try to explain what's happening a bit more fully.

Per report from Олег Самойлов.  Back-patch to 9.5 where this was added.
Thanks to Stephen Frost for off-list discussion.

Discussion: https://postgr.es/m/3298321532002010@sas1-2b3c3045b736.qloud-c.yandex.net

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/72c453d30d565de91c921c7f5e0c984c23e77df5

Modified Files
--------------
doc/src/sgml/ddl.sgml | 42 +++++++++++++++++++++++++++++++++---------
1 file changed, 33 insertions(+), 9 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Add ssl_library preset parameter
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix pg_dump's failure to dump REPLICA IDENTITY for constraintin