Bug with usernames that are only numbers

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

Bug with usernames that are only numbers

От:
Michiel Lange <michiel@minas.demon.nl>
Дата:
Hello people,

I am sorry for bothering, but lately I ran into a bug, and it took me 
really some time to find it out. However the problem is this:

It is possible to create a user of which the Username consists only of 
numbers. (sorry for this long and descriptive english)
e.g.: CREATE USER "12345" WITH ENCRYPTED PASSWORD 'ohjoy';

However, this user will not be able to connect. At least not with 'psql', 
but I had trouble trying out with PHP as well, so I reckon this happens all 
the time.

neither of these options will work:
psql -U 12345
psql -U "12345"
psql -U '12345'

Of course there are workarounds, but it is not right that I can create 
users that cannot connect...

Michiel
FAQ