Re: Cannot log in as newly created user

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cannot log in as newly created user
Дата
Msg-id 21219.1450707779@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cannot log in as newly created user  (Emma Saurus <emmasaurus@westnet.com.au>)
Список pgsql-bugs
Emma Saurus <emmasaurus@westnet.com.au> writes:
> postgres=# CREATE ROLE EmmaChwan CREATEDB LOGIN PASSWORD 'password';
>>> CREATE ROLE
> postgres=# \q

> C:\Users\EmmaChwan>psql
>>> Password:
>>> psql: FATAL:  password authentication failed for user "EmmaChwan"

Your problem here is case sensitivity, or lack of it.  The unquoted
identifier EmmaChwan is smashed to lower case when seen in a SQL
command, so the actually created user name is "emmachwan".  But when
you submit a user (or database) name in a connection request, that's
not SQL language so no quote-stripping or case-folding is done.

You can make it work with

    CREATE ROLE "EmmaChwan" ...

but bear in mind you'll have to double-quote that user name *every*
time you refer to it in SQL.  The same goes for any other mixed-case
name that you want to be really truly mixed-case and not case-insensitive.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Greg Clough
Дата:
Сообщение: Re: BUG #13770: Extending recovery_min_apply_delay on Standby causes it to be unavailable for a while
Следующее
От: Grzegorz Garlewicz
Дата:
Сообщение: Re: BUG #13824: EXISTS sometimes uses seq scan instead of index