Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnDQq-0006oV-UI for pgsql-docs@arkaria.postgresql.org; Thu, 31 Aug 2017 00:34:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dnDQq-0007WH-9A for pgsql-docs@arkaria.postgresql.org; Thu, 31 Aug 2017 00:34:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dnDQT-0006rg-GX for pgsql-docs@postgresql.org; Thu, 31 Aug 2017 00:33:41 +0000 Received: from static-96-255-250-162.washdc.fios.verizon.net ([96.255.250.162] helo=tamriel.snowman.net) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnDQQ-00051e-2w for pgsql-docs@postgresql.org; Thu, 31 Aug 2017 00:33:40 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 528725F795; Wed, 30 Aug 2017 20:33:37 -0400 (EDT) Date: Wed, 30 Aug 2017 20:33:37 -0400 From: Stephen Frost To: "David G. Johnston" Cc: Bruce Momjian , deinspanjer@gmail.com, "pgsql-docs@postgresql.org" Subject: Re: Row Level Security Policies documentation doesn't mention lack of support for views Message-ID: <20170831003337.GI4628@tamriel.snowman.net> References: <20170629142511.1481.84436@wrigleys.postgresql.org> <20170831000910.GA28535@momjian.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TVjdeeawRbSAQPoq" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --TVjdeeawRbSAQPoq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable David, Bruce, * David G. Johnston (david.g.johnston@gmail.com) wrote: > The CREATE VIEW documentation links to >=20 > https://www.postgresql.org/docs/9.6/static/rules-privileges.html >=20 > which covers this dynamic in considerable detail (and there is a blurb on > the CREATE VIEW page as well), and specifically: >=20 > "Relations that are used due to rules get checked against the privileges = of > the rule owner, not the user invoking the rule." >=20 > It does feel like an additional blurb about views and a link to the above > page would be warranted on the ddl-rowsecurity.html page. I tend to agree, almost always, that additional documentation is a benefit. The only drawback to it is that, sometimes, we end up saying the same thing too much and that leads to readers skipping past important sections. I do think we need to provide more documentation around how views and our privilege system work as I find that the question comes up somewhat regularly. Note that this isn't RLS specific, but applies to both the GRANT system and RLS- views are executed as the user of the view and not with the privileges of the view user. I can certainly try to help with crafting additional documentation around this once I'm back from PostgresOpen in San Francisco next week. Thanks! Stephen --TVjdeeawRbSAQPoq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJZp1lgAAoJEO1sijiDR2RVFqMP/09h4mMLuC+LCTni8gxzwnfP +M8nD8RbLiNAt5CNOpOGhHn4R5E5LaVXXpUKN2cm5QggJb92IG810X7kiaJyCe0O y2Q9r6vOA86+Cp1mXeSyCNnRPv3plzVmq80UoozGoeNJz7J9t3fh84jtQbXFN80K aWFud54CboBMyMRAs2fZglDLoZqo1y5t+rxP1SHgwchbDXYsaQJh/uF3wjuwFt02 TG7kOHX3w2AzBVZTMnouG/bPIx2toORYBEdRvQ19RZUP0QLHwJv7qrzcystA3+7d sPTjw3XM1gZLs2vnU4viikotL/T7AbGS3noK7PxXSfSa1uv66ziZCd7k+kggxTYT 8AgHrKdHu4UaL4fVoNt5a/9MATnKsV/29eXIWKQarxxr/RCURzL0CyIbvlq0IU0h 2mvWsUROlL5m1gjD0XCVrf/C/U50cMUkctpv2O9yuz1ibs1dHnPLuFyf9h+tJB3G GVIlCcKyuEiNy/WqNGtZ+x8AU3Sco6uXxsd7FG34iB3u+e1v2wD+FymnMXwyLej3 3MlBnHKuSLbcGYwKbEVpylVAOLYuN2xlsP0jV+fcWSdZTGj/c02LYnp35sPcKv9g 92a09/LIf+cK06Cfumq0TkkFMD9L9ptzGLSKtYkAayAQ3YfEnOjp1iC8O6ZcpnkF ZBCF4XJhtNub6mtAV7J3 =M6N0 -----END PGP SIGNATURE----- --TVjdeeawRbSAQPoq--