Evan Nelson escribió:
> 
> The following bug has been logged online:
> 
> Bug reference:      5431
> Logged by:          Evan Nelson
> Email address:      ean5...@gmail.com
> PostgreSQL version: 8.4
> Operating system:   Ubuntu 9.10
> Description:        CREATE USER is not case sensitive, but psql command line
> arguments are
> Details: 
> 
> When creating a user (via CREATE USER/ROLE), the username you choose is not
> case sensitive (e.g. "nEWuSer" is saved as "newuser"). However, the command
> line arguments for psql ARE case sensitive. This means that if I create a
> user like "newUser", then try to log into postgres via psql as "newUser",
> I'll be told the the role doesn't exist. Then, when I log into postgres as
> an existing user and try to re-create the role "newUser", postgres will tell
> me that the role already exists -- a frustrating cycle.

Right.  This is because of a mixture of trying to adhere to the SQL
standard (which mandates that unquoted identifiers are case-folded) and
convenience of usafe of the shell command line.  The strict solution would
be to case-fold unquoted identifiers passed as arguments to psql, so
you'd be required to type something like
psql \"nEWuSer\"
to be able to log in as such a user -- otherwise the quotes would be
stripped by the shell.  However, this is so inconvenient that it has
been dumped in favor of not doing case-folding of idenfiers in shell
command line arguments, regardless of quoting.

In short, not a bug ...

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to