pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Robert Haas <robertmhaas@gmail.com>
To: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Give a better error message on invalid hostaddr option.
Date: Thu, 19 Jul 2018 20:28:36 +0300
Message-ID: <771d7899-9013-64fc-51db-78c3ea1eb940@iki.fi> (raw)
In-Reply-To: <CA+TgmoapFQA30NomGKEaZCu3iN7mF7fux8fbbk9SouVOT2JP7w@mail.gmail.com>
References: <E1dJGoj-0002z0-7U@gemulon.postgresql.org>
	<CA+TgmoapFQA30NomGKEaZCu3iN7mF7fux8fbbk9SouVOT2JP7w@mail.gmail.com>

On 19/07/18 17:07, Robert Haas wrote:
> On Fri, Jun 9, 2017 at 6:06 AM, Heikki Linnakangas
> <heikki.linnakangas@iki.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




view thread (4+ messages)  latest in thread

Message-ID: <771d7899-9013-64fc-51db-78c3ea1eb940@iki.fi>
Permalink:  ../771d7899-9013-64fc-51db-78c3ea1eb940@iki.fi/
Also on:    postgresql.org/message-id/771d7899-9013-64fc-51db-78c3ea1eb940@iki.fi

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: hlinnaka@iki.fi, robertmhaas@gmail.com, heikki.linnakangas@iki.fi, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Give a better error message on invalid hostaddr option.
  In-Reply-To: <771d7899-9013-64fc-51db-78c3ea1eb940@iki.fi>
  References: <E1dJGoj-0002z0-7U@gemulon.postgresql.org> <CA+TgmoapFQA30NomGKEaZCu3iN7mF7fux8fbbk9SouVOT2JP7w@mail.gmail.com> <771d7899-9013-64fc-51db-78c3ea1eb940@iki.fi>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox