pgsql: Fix error message when a hostaddr cannot be parsed.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix error message when a hostaddr cannot be parsed.
Date: 2018-07-19 17:26:11
Message-ID: E1fgCgt-0003pQ-1d@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ff4fb4cc1bde61a536a30834d19be088828a350e

Modified Files
--------------
src/interfaces/libpq/fe-connect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2018-07-19 17:28:36 Re: [COMMITTERS] pgsql: Give a better error message on invalid hostaddr option.
Previous Message Robert Haas 2018-07-19 14:07:26 Re: [COMMITTERS] pgsql: Give a better error message on invalid hostaddr option.