Re: [ADMIN] Cannot connect to the database (PG 7.3)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [ADMIN] Cannot connect to the database (PG 7.3)
Дата
Msg-id 3032.1043791462@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [ADMIN] Cannot connect to the database (PG 7.3)  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Re: [ADMIN] Cannot connect to the database (PG 7.3)  ("Shridhar Daithankar<shridhar_daithankar@persistent.co.in>" <shridhar_daithankar@persistent.co.in>)
Список pgsql-hackers
I wrote:
> Michiel Lange <michiel@minas.demon.nl> writes:
>> It is, somehow, not possible to connect as a user which name is completely 
>> numeric.

> I muttered "nonsense!" to myself, but darned if you're not right:

> regression=# create user "12345";
> CREATE USER
> regression=# \q
> $ psql -U 12345 regression
> psql: FATAL:  SET SESSION AUTHORIZATION: permission denied

> Will look into it.

After some looking, it appears the culprit is
assign_session_authorization() in commands/variable.c, which is assuming
that a numeric-looking parameter string should be taken as a numeric
user sysid, rather than an actual user name.

The reason this was done was to avoid the need to do catalog lookups
when restoring a prior setting during error recovery.  That's still a
valid concern, so right offhand I don't see an easy fix.  Any ideas?
        regards, tom lane


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

Предыдущее
От: "Reggie Burnett"
Дата:
Сообщение: Re: Request for qualified column names
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Request for qualified column names