"Joshua D. Drake" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to