Re: Inconsistencies with create role

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inconsistencies with create role
Дата
Msg-id 27000.1124759573@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Inconsistencies with create role  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: Inconsistencies with create role  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.com> writes:
> foo=# create role foo with createdb;
> CREATE ROLE
> foo=# create user foo;
> ERROR:  role "foo" already exists

> I understand what is happening, but perhaps the error should be:
> A role "foo" already exists which can not be the same as a username?

The documentation already says prominently that roles and users are
the same thing.  If you're fooling with CREATE ROLE without having
read any of that, I'm not sure that an error message will help.

Also, although the SQL standard thinks that roles and users are
distinct, it requires them to have distinct names; this is necessary
because <authorization identifier> doesn't syntactically distinguish
between the two cases.  So there's no support in the spec either for
supposing that you can create both user foo and role foo.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Let's drop some GUCs (bgwriter)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CREATE USER and pg_user