pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Invalid field name in RLS description
2+ messages / 2 participants
[nested] [flat]

* Invalid field name in RLS description
@ 2016-09-12 14:43 Alexander Law <exclusion@gmail.com>
  2016-09-12 23:21 ` Re: Invalid field name in RLS description Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Alexander Law @ 2016-09-12 14:43 UTC (permalink / raw)
  To: pgsql-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-docs

Attachments:

ddl-rowsecurity_user_column.patch (text/x-patch, 624B) download diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 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>
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: Invalid field name in RLS description
  2016-09-12 14:43 Invalid field name in RLS description Alexander Law <exclusion@gmail.com>
@ 2016-09-12 23:21 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-09-12 23:21 UTC (permalink / raw)
  To: Alexander Law <exclusion@gmail.com>; +Cc: pgsql-docs

Alexander Law <exclusion@gmail.com> writes:
> 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).

Pushed; I also made a few more changes to make some nearby examples
consistent with that.

Also pushed the other typos you pointed out today.  Thanks for catching
them!

			regards, tom lane


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-09-12 23:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12 14:43 Invalid field name in RLS description Alexander Law <exclusion@gmail.com>
2016-09-12 23:21 ` Tom Lane <tgl@sss.pgh.pa.us>

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