From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
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-12 03:39:35 |
Message-ID: | 4B99B777.2010508@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian wrote:
> + /* If it was 'invalid authorization', add .pgpass mention */
> + if (conn->dot_pgpass_used && conn->password_needed && conn->result &&
> + /* only works with >= 9.0 servers */
> + strcmp(PQresultErrorField(conn->result, PG_DIAG_SQLSTATE),
> + ERRCODE_INVALID_PASSWORD_SPECIFICATION) == 0)
> + appendPQExpBufferStr(&conn->errorMessage,
> + libpq_gettext("password retrieved from .pgpass\n"));
>
Surely we should use the name of the actual file from which the password
was retrieved here, which could be quite different from ".pgpass" (see
PGPASSFILE environment setting) and is different by default on Windows
anyway. Using a hardcoded ".pgpass" in those situations could be quite
confusing.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2010-03-12 04:09:45 | Re: Dyamic updates of NEW with pl/pgsql |
Previous Message | Bruce Momjian | 2010-03-12 03:00:23 | Re: Warning about invalid .pgpass passwords |