From: Alexander Law <exclusion@gmail.com>
To: pgsql-docs@postgresql.org <pgsql-docs@postgresql.org>
Subject: Invalid field name in RLS description
Date: Mon, 12 Sep 2016 17:43:37 +0300
Message-ID: <905bf384-92a8-20aa-d705-6269534c721a@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>
Hello,
It seems, that the RLS description supposes that the users table
contains the field "user", but it's a reserved keyword.
Patch attached. (The replacement "user_name" selected as corresponding
to the following examples).
Best regards,
Alexander
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docsAttachments:ddl-rowsecurity_user_column.patch (text/x-patch, 624B) downloaddiff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgmlindex a393813..c907081 100644--- a/doc/src/sgml/ddl.sgml+++ b/doc/src/sgml/ddl.sgml@@ -1629,7 +1629,7 @@ CREATE POLICY account_managers ON accounts TO managers
<programlisting>
CREATE POLICY user_policy ON users
- USING (user = current_user);+ USING (user_name = current_user);
</programlisting>
<para>
@@ -1642,7 +1642,7 @@ CREATE POLICY user_policy ON users
<programlisting>
CREATE POLICY user_policy ON users
USING (true)
- WITH CHECK (user = current_user);+ WITH CHECK (user_name = current_user);
</programlisting>
<para>
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-docs@postgresql.org
Cc: exclusion@gmail.com
Subject: Re: Invalid field name in RLS description
In-Reply-To: <905bf384-92a8-20aa-d705-6269534c721a@gmail.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