Valid role name (PostgreSQL 9.0.4)

Поиск
Список
Период
Сортировка
От Grzegorz Szpetkowski
Тема Valid role name (PostgreSQL 9.0.4)
Дата
Msg-id BANLkTinZOs1dqjzK3BoAnRVY+9_9wwHFcQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Valid role name (PostgreSQL 9.0.4)  (Josh Kupershmidt <schmiddy@gmail.com>)
Список pgsql-novice
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.

В списке pgsql-novice по дате отправления:

Предыдущее
От: Grzegorz Szpetkowski
Дата:
Сообщение: Superuser accout (PostgreSQL 9.0.4)
Следующее
От: Josh Kupershmidt
Дата:
Сообщение: Re: Superuser accout (PostgreSQL 9.0.4)