Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5NGx-0008DN-Nm for pgsql-hackers@arkaria.postgresql.org; Wed, 25 May 2016 01:06:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b5NGx-00012r-9n for pgsql-hackers@arkaria.postgresql.org; Wed, 25 May 2016 01:06:07 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b5NFZ-0005mr-BA for pgsql-hackers@postgresql.org; Wed, 25 May 2016 01:04:41 +0000 Received: from 104-190-1-44.lightspeed.sndgca.sbcglobal.net ([104.190.1.44] helo=joeconway.com) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5NFW-00014J-DH for pgsql-hackers@postgresql.org; Wed, 25 May 2016 01:04:40 +0000 Received: from [72.214.29.243] (account jconway@joeconway.com HELO [192.168.4.41]) by joeconway.com (CommuniGate Pro SMTP 6.1.4) with ESMTPSA id 16495746 for pgsql-hackers@postgreSQL.org; Tue, 24 May 2016 18:04:37 -0700 From: Joe Conway Subject: RLS related docs Openpgp: id=4EA5B4659ED59CC9538139A5332B7E68B699434A To: PostgreSQL-development Message-ID: <5744FA24.3030008@joeconway.com> Date: Tue, 24 May 2016 18:04:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NtGbu7p3kNatrmgnWI5F32JXkmW1fP8DL" X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NtGbu7p3kNatrmgnWI5F32JXkmW1fP8DL Content-Type: multipart/mixed; boundary="W81GRanvLbdoqRsv9u0jMovkB0PPJ5H4N" From: Joe Conway To: PostgreSQL-development Message-ID: <5744FA24.3030008@joeconway.com> Subject: RLS related docs --W81GRanvLbdoqRsv9u0jMovkB0PPJ5H4N Content-Type: multipart/mixed; boundary="------------090508010503080201030708" This is a multi-part message in MIME format. --------------090508010503080201030708 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Please see attached two proposed patches for the docs related to RLS: 1) Correction to pg_restore 2) Additional mentions that "COPY FROM" does not allow RLS to be enabled Comments? Related question: I believe COPY tbl TO ... is internally converted to COPY (select * FROM tbl) TO ... when RLS is involved. Do we want to document that? Joe --=20 Crunchy Data - http://crunchydata.com PostgreSQL Support for Secure Enterprises Consulting, Training, & Open Source Development --------------090508010503080201030708 Content-Type: text/x-diff; name="2016.05.24.00-pg_restore.sgml.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="2016.05.24.00-pg_restore.sgml.diff" diff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_resto= re.sgml index 66d09f4..e951182 100644 *** a/doc/src/sgml/ref/pg_restore.sgml --- b/doc/src/sgml/ref/pg_restore.sgml *************** *** 537,543 **** =20 Note that this option currently also requires the dump be in INSERT ! format, as COPY TO does not support row secu= rity. --- 537,543 ---- =20 Note that this option currently also requires the dump be in INSERT ! format, as COPY FROM does not support row se= curity. --------------090508010503080201030708 Content-Type: text/x-diff; name="2016.05.24.00-RLS.docs.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="2016.05.24.00-RLS.docs.diff" diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 07e2f45..bb7662a 100644 *** a/doc/src/sgml/ref/copy.sgml --- b/doc/src/sgml/ref/copy.sgml *************** COPY coun *** 502,507 **** --- 502,511 ---- null strings to null values and unquoted null strings to empty stri= ngs. =20 + + COPY FROM does not support row security. Use + INSERT instead. + =20 diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgm= l index bc28684..0995c6b 100644 *** a/doc/src/sgml/ref/pg_dump.sgml --- b/doc/src/sgml/ref/pg_dump.sgml *************** PostgreSQL documentation *** 716,721 **** --- 716,726 ---- to dump the parts of the contents of the table that they have a= ccess to. =20 + + Note that if you use this option currently, you probably also w= ant + the dump be in INSERT format, as the + COPY FROM during restore does not support ro= w security. + =20 --------------090508010503080201030708-- --W81GRanvLbdoqRsv9u0jMovkB0PPJ5H4N-- --NtGbu7p3kNatrmgnWI5F32JXkmW1fP8DL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXRPokAAoJEDfy90M199hlcvYP/2jS9NUY4pMM8E4YBp3pAZ3L eIF3AwZ7NfU7qv2WQ9XlEFDLws4NdpEQPAYC3VM118fZmq17OlnQSatHKxizdIkz 6SPi0YB7D4JTewQDWyRSGp7C8ssSOE4th8R8Xs9379lW5jQg46eveClwL2TMPGRV iNDv0IUjRmBiHK2juN/HqrKwWfyCKp0JBtQkelmxo/aLaxDyXjn93jeQTRjfwBZS 76caO+7smncWqRXr05nsgaAfHpKIqzVISuTBs1KA4QRNbANXERmnsHozAKcxqoSG B65lU12CUAYWieuiVzsXhwDIb+UzP0CTYlPN+SXikN11KB4Al0ttxbON0/9OwwjL PMgjm0tb+PmkEhvC7t/Dci2WSLApJOYw6nDOtK80rk/cnskesW9Yz0gaU6h/GTXG H35ZffCH68rlRYYE6+GfiZOGnxZwmnj6Q+010ks+se/gyWMKdYZsyia/C+hOywpJ +NQ1Iknuow0uE9b4zdYzRyYOv9HnxMp5AzPhTDdRGp2FNysnwgywscgvsJfJ3TFr 8aTzadzg8ctH5f8gXFuPetvrwAicPuob6R/uhqtUS3jc2a5pZUk7VgNG+1n4aUBx PkysKM4CyA8jM7C5I6BFfuSFrABhqYVkohotpj98kPB6Pkx8KbqTyhUh+Jlc2mmf XWhh+QF9jaYqfVi7BMw8 =vTfH -----END PGP SIGNATURE----- --NtGbu7p3kNatrmgnWI5F32JXkmW1fP8DL--