Re: Warning about invalid .pgpass passwords
От | Alvaro Herrera |
---|---|
Тема | Re: Warning about invalid .pgpass passwords |
Дата | |
Msg-id | 20100311212446.GC3512@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: Warning about invalid .pgpass passwords (Bruce Momjian <bruce@momjian.us>) |
Ответы |
Re: Warning about invalid .pgpass passwords
|
Список | pgsql-hackers |
Bruce Momjian wrote: > + static void > + dot_pg_pass_warning(PGconn *conn) > + { > + /* If it was 'invalid authorization', add .pgpass mention */ > + if (conn->dot_pgpass_used && conn->password_needed && conn->result && > + /* only works with >= 9.0 servers */ > + atoi(PQresultErrorField(conn->result, PG_DIAG_SQLSTATE)) == > + SQLSTATE_TO_BASE10(ERRCODE_INVALID_PASSWORD_SPECIFICATION)) > + appendPQExpBufferStr(&conn->errorMessage, > + libpq_gettext("password retrieved from .pgpass\n")); > + } This bit seems strange ... I think we just do strcmp() to compare sqlstates? -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: