From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Evan Nelson <ean5533(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5431: CREATE USER is not case sensitive, but psql command line arguments are |
Date: | 2010-04-19 20:20:37 |
Message-ID: | 20100419202037.GL6733@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Evan Nelson escribió:
>
> The following bug has been logged online:
>
> Bug reference: 5431
> Logged by: Evan Nelson
> Email address: ean5533(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2010-04-19 20:38:14 | Re: BUG #5431: CREATE USER is not case sensitive, but psql command line arguments are |
Previous Message | Peter Eisentraut | 2010-04-19 20:14:22 | Re: bugs that have not been replied-to on list |