Re: Incorrect error message in InitializeSessionUserId

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Incorrect error message in InitializeSessionUserId
Дата
Msg-id CAB7nPqSOxav0=5fuabyP2WJ78VoEnSCCj_-kCjQDbWLjsZ3Jhw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Incorrect error message in InitializeSessionUserId  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Ответы Re: Incorrect error message in InitializeSessionUserId  (Robert Haas <robertmhaas@gmail.com>)
Re[2]: [HACKERS] Incorrect error message in InitializeSessionUserId  (Dmitriy Sarafannikov <d.sarafannikov@bk.ru>)
Список pgsql-hackers
On Fri, Mar 4, 2016 at 10:45 AM, Haribabu Kommi
<kommi.haribabu@gmail.com> wrote:
> On Wed, Mar 2, 2016 at 12:21 AM, Dmitriy Sarafannikov
> <d.sarafannikov@bk.ru> wrote:
>> Hi all,
>>
>> I have found incorrect error message in InitializeSessionUserId function
>> if you try to connect to database by role Oid (for example
>> BackgroundWorkerInitializeConnectionByOid).
>> If role have no permissions to login, you will see error message like this:
>> FATAL:  role "(null)" is not permitted to log in
>>
>> I changed few lines of code and fixed this.
>> Patch is attached.
>> I want to add this patch to commitfest.
>> Any objections?
>>
>
> The patch adds the support of taking the role name from the role tuple
> instead of using the provided rolename variable, because it is possible
> that rolename variable is NULL if the connection is from a background
> worker.
>
> The patch is fine, I didn't find any problems, I marked it as ready for
> committer.
>
> IMO this patch may need to backpatch supported branches as it is
> a bug fix. Committer can decide.

+1 for the backpatch. The current error message should the rolename be
undefined in this context is misleading for users.
-- 
Michael



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: WIP: Upper planner pathification
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgbench stats per script & other stuff