Re: BUG #8586: Misleading fe_sendauth error message

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #8586: Misleading fe_sendauth error message
Дата
Msg-id 23565.1384143116@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #8586: Misleading fe_sendauth error message  (mle+tools@mega-nerd.com)
Ответы Re: BUG #8586: Misleading fe_sendauth error message
Список pgsql-bugs
mle+tools@mega-nerd.com writes:
> Running the command:
>     PGPASSFILE=pgpass psql --no-password --username myname mydb
> --command="\dt"
> works fine if the port number in the pgpass file is correct, but if the port
> number is incorrect the error message is:
>     psql: fe_sendauth: no password supplied
> which is highly misleading. Surely the error message should be "connection
> refused" or some such?

I'm not sure how we could improve that.  If the port number in the
password file doesn't match the intended connection, that means the
entry doesn't apply to this connection.  We can hardly issue error
messages on the basis of the presence of unrelated entries in a
.pgpass file.  So what the code is seeing is that the server demanded
a password (or so I'd assume), and it did not have one to give.

            regards, tom lane

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

Предыдущее
От: mle+tools@mega-nerd.com
Дата:
Сообщение: BUG #8586: Misleading fe_sendauth error message
Следующее
От: Erik de Castro Lopo
Дата:
Сообщение: Re: BUG #8586: Misleading fe_sendauth error message