pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Doc: fix oversimplified example for CREATE POLICY.
Date: Mon, 30 Jul 2018 15:54:57 +0000
Message-ID: <E1fkAVd-0005ha-0N@gemulon.postgresql.org> (raw)

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9295d7cf50fbcf1f2be19f835c9b2b1f0186fd9b

Modified Files
--------------
doc/src/sgml/ddl.sgml | 36 ++++++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1fkAVd-0005ha-0N@gemulon.postgresql.org>
Permalink:  ../E1fkAVd-0005ha-0N@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1fkAVd-0005ha-0N@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Doc: fix oversimplified example for CREATE POLICY.
  In-Reply-To: <E1fkAVd-0005ha-0N@gemulon.postgresql.org>
  References: <E1fkAVd-0005ha-0N@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox