Bug #591: Postgres apparently not identifying users created in Caps

Started by PostgreSQL Bugs Listabout 24 years ago2 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

Ricardo J. M�ndez Castro (rmendez@sheertalent.com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Postgres apparently not identifying users created in Caps

Long Description
I'm unable to change the password for an user after creating it with some of the letters in caps. Here are the steps I'm following (from my user on a Linux machine):

su -
su - postgresql
createuser Test; (I don't give him any superuser rights)
psql -d testdatabase; (whichever database)

Inside psql, I then do:

alter user Test with password 'testpwd';

I then get an error message stating that the user 'test' (no caps) isn't known to the system. Logging in with the user Test with

psql -d testdatabase -U Test;

does work. The only problem is in changing the password from psql. I WAS able to change the password from pgAdmin II.

Sample Code

No file was uploaded with this report

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: Bug #591: Postgres apparently not identifying users created in Caps

pgsql-bugs@postgresql.org writes:

alter user Test with password 'testpwd';

You need double quotes.

alter user "Test" with password 'testpwd';

You may care to read the section of the user's guide that discusses
case insensitivity of identifiers in SQL.

regards, tom lane