From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Eamonn Martin <mas01em(at)gold(dot)ac(dot)uk>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Warning about invalid .pgpass passwords |
Date: | 2010-03-10 03:31:56 |
Message-ID: | 3f0b79eb1003091931w2f379fe4r1ed53fea304ea1cf@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 10, 2010 at 11:52 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> The attached patch reports the fact that .pgpass was used if the libpq
> connection fails:
+ /*
+ * If the connection failed, we should mention that
+ * we got the password from .pgpass in case that
+ * password is wrong.
+ */
+ if (conn->used_dot_pgpass && conn->password_needed)
+ appendPQExpBufferStr(&conn->errorMessage,
+ libpq_gettext("(password retrieved from .pgpass)\n"));
I think that this should be in PQconnectPoll() rather than connectDBComplete().
Otherwise, only when we make a connection to the server in a nonblocking manner
(i.e., use PQconnectStart() and PQconnectPoll()), that HINT message is
not output.
This looks odd for me. Thought?
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-03-10 03:39:27 | Re: Warning about invalid .pgpass passwords |
Previous Message | Bruce Momjian | 2010-03-10 02:52:39 | Warning about invalid .pgpass passwords |