Обсуждение: Bug #591: Postgres apparently not identifying users created in Caps

Поиск
Список
Период
Сортировка

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

От
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'mfollowing (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
Testwith 

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

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

От
Tom Lane
Дата:
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