Inconsistencies with create role - Mailing list pgsql-hackers

From Joshua D. Drake
Subject Inconsistencies with create role
Date
Msg-id 430A55B6.6090104@commandprompt.com
Whole thread Raw
Responses Re: Inconsistencies with create role  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello,

When doing:

SELECT * FROM pg_user;

foo=# select * from pg_user; usename | usesysid | usecreatedb | usesuper | usecatupd |  passwd  | 
valuntil | useconfig
---------+----------+-------------+----------+-----------+----------+----------+----------- jd      |       10 | t
    | t        | t         | ******** |         |
 
(1 row)

Then:

foo=# create role foo with createdb;
CREATE ROLE
foo=# create user foo;
ERROR:  role "foo" already exists
ERROR:  role "foo" already exists
foo=# select * from pg_user; usename | usesysid | usecreatedb | usesuper | usecatupd |  passwd  | 
valuntil | useconfig
---------+----------+-------------+----------+-----------+----------+----------+----------- jd      |       10 | t
    | t        | t         | ******** |         |
 
(1 row)

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?

Or something like that...

Sincerely,

Joshua D. Drake


-- 
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: beginning hackers
Next
From: Tom Lane
Date:
Subject: Re: data on devel code perf dip