In standard postgres/main/5432 cluster I created new role (from
postgres account):
createuser -SRD user
psql -c "\du"
List of roles
Role name | Attributes | Member of
-----------+-----------------------------------+-----------
postgres | Superuser, Create role, Create DB | {}
user | | {}
Then I run:
psql -c "ALTER ROLE user CREATEDB"
ERROR: syntax error at or near "user"
LINE 1: ALTER ROLE user CREATEDB
^
After some searching I found that 'user' is reserved PostgreSQL keyword
(http://www.postgresql.org/docs/9.0/interactive/sql-keywords-appendix.html),
but I think that PostgreSQL should deny my request to create role with
reserved keyword. What do you think ? I mean something like:
createuser -SRD user
ERROR: illegal name
Thanks,
Grzegorz Sz.