From: Joe Conway <mail@joeconway.com>
To: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: RLS related docs
Date: Tue, 24 May 2016 18:04:36 -0700
Message-ID: <5744FA24.3030008@joeconway.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
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
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
Attachments:download all (3 files, .tar.gz)2016.05.24.00-pg_restore.sgml.diff (text/x-diff, 750B) downloaddiff --git a/doc/src/sgml/ref/pg_restore.sgml b/doc/src/sgml/ref/pg_restore.sgmlindex 66d09f4..e951182 100644
*** a/doc/src/sgml/ref/pg_restore.sgml
--- b/doc/src/sgml/ref/pg_restore.sgml
***************
*** 537,543 ****
<para>
Note that this option currently also requires the dump be in <command>INSERT</command>
! format, as <command>COPY TO</command> does not support row security.
</para>
</listitem>
</varlistentry>
--- 537,543 ----
<para>
Note that this option currently also requires the dump be in <command>INSERT</command>
! format, as <command>COPY FROM</command> does not support row security.
</para>
</listitem>
</varlistentry>
2016.05.24.00-RLS.docs.diff (text/x-diff, 1.2K) downloaddiff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgmlindex 07e2f45..bb7662a 100644
*** a/doc/src/sgml/ref/copy.sgml
--- b/doc/src/sgml/ref/copy.sgml
*************** COPY <replaceable class="parameter">coun
*** 502,507 ****
--- 502,511 ----
null strings to null values and unquoted null strings to empty strings.
</para>
+ <para>+ <command>COPY FROM</command> does not support row security. Use+ <command>INSERT</command> instead.+ </para>
</refsect1>
<refsect1>
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgmlindex 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 access to.
</para>
+ <para>+ Note that if you use this option currently, you probably also want+ the dump be in <command>INSERT</command> format, as the+ <command>COPY FROM</command> during restore does not support row security.+ </para>
</listitem>
</varlistentry>
signature.asc (application/pgp-signature, 835B) download
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: mail@joeconway.com
Subject: Re: RLS related docs
In-Reply-To: <5744FA24.3030008@joeconway.com>
* 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