From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Give a better error message on invalid hostaddr option. |
Date: | 2018-07-19 17:28:36 |
Message-ID: | 771d7899-9013-64fc-51db-78c3ea1eb940@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On 19/07/18 17:07, Robert Haas wrote:
> On Fri, Jun 9, 2017 at 6:06 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)iki(dot)fi> wrote:
>> Give a better error message on invalid hostaddr option.
>>
>> If you accidentally pass a host name in the hostaddr option, e.g.
>> hostaddr=localhost, you get an error like:
>>
>> psql: could not translate host name "localhost" to address: Name or service not known
>>
>> That's a bit confusing, because it implies that we tried to look up
>> "localhost" in DNS, but it failed. To make it more clear that we tried to
>> parse "localhost" as a numeric network address, change the message to:
>>
>> psql: could not parse network address "localhost": Name or service not known
>
> This commit doesn't seem to deliver the behavior described in the
> commit message. Instead, I get:
>
> [rhaas pgsql]$ psql 'hostaddr=localhost'
> psql: could not parse network address "(null)": nodename nor servname
> provided, or not known
>
> Proposed patch attached.
Seems that I broke this shortly afterwards, by commit 7b02ba62e9.
Pushed, thanks!
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-07-19 17:36:26 | Re: [COMMITTERS] pgsql: Give a better error message on invalid hostaddr option. |
Previous Message | Heikki Linnakangas | 2018-07-19 17:26:11 | pgsql: Fix error message when a hostaddr cannot be parsed. |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-07-19 17:36:26 | Re: [COMMITTERS] pgsql: Give a better error message on invalid hostaddr option. |
Previous Message | David G. Johnston | 2018-07-19 15:44:10 | Re: psql's \d versus included-index-column feature |