mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +03:00
Fix error message when a hostaddr cannot be parsed.
We were incorrectly passing hostname, not hostaddr, in the error message, and because of that, you got: $ psql 'hostaddr=foo' psql: could not parse network address "(null)": Name or service not known Backpatch to v10, where this was broken (by commit 7b02ba62e9). Report and fix by Robert Haas. Discussion: https://www.postgresql.org/message-id/CA+TgmoapFQA30NomGKEaZCu3iN7mF7fux8fbbk9SouVOT2JP7w@mail.gmail.com
This commit is contained in:
parent
a1dc4ea020
commit
ff4fb4cc1b
@ -1744,7 +1744,7 @@ connectDBStart(PGconn *conn)
|
|||||||
if (ret || !ch->addrlist)
|
if (ret || !ch->addrlist)
|
||||||
appendPQExpBuffer(&conn->errorMessage,
|
appendPQExpBuffer(&conn->errorMessage,
|
||||||
libpq_gettext("could not parse network address \"%s\": %s\n"),
|
libpq_gettext("could not parse network address \"%s\": %s\n"),
|
||||||
ch->host, gai_strerror(ret));
|
ch->hostaddr, gai_strerror(ret));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHT_UNIX_SOCKET:
|
case CHT_UNIX_SOCKET:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user