reserved role names

Started by Joshua D. Drakeover 9 years ago2 messages
#1Joshua D. Drake
jd@commandprompt.com

Hey,

For grins while writing up an example on RLS for a client I tried the
following:

policy=# create role insert;
CREATE ROLE

policy=# create role select;
ERROR: syntax error at or near "select"
LINE 1: create role select;
^
policy=# create role delete;
CREATE ROLE

Is it intentional that insert and delete are allowed and select is not
or is it an oversight?

Sincerely,

JD

--
Command Prompt, Inc. http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.

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

#2Andrew Gierth
andrew@tao11.riddles.org.uk
In reply to: Joshua D. Drake (#1)
Re: reserved role names

"Joshua" == Joshua D Drake <jd@commandprompt.com> writes:

Joshua> Is it intentional that insert and delete are allowed and select
Joshua> is not or is it an oversight?

Just an artifact of SELECT being fully reserved (needed for (SELECT ...)
syntax to work right) while INSERT and DELETE are unreserved.

--
Andrew (irc:RhodiumToad)

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