Re: duplicate connection failure messages

Bruce Momjian <bruce@momjian.us>

From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, Magnus Hagander <magnus@hagander.net>, Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2010-11-19T19:43:33Z
Lists: pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Excerpts from Bruce Momjian's message of vie nov 19 00:17:59 -0300 2010:
> >> Alvaro Herrera wrote:
> >>> I think we should use inet_ntop where available to print the address.
> >> 
> >> Good idea because inet_ntop() is thread-safe.  Does that work on IPv6? 
> >> You indicated that inet_ntoa() does not.
> 
> > According to opengroup.org, IPv6 should work if the underlying libraries
> > support it, whereas inet_ntoa explicitely does not.
> > http://www.opengroup.org/onlinepubs/009695399/functions/inet_ntop.html
> > http://www.opengroup.org/onlinepubs/009695399/functions/inet_addr.html
> 
> I get the impression that you guys have forgotten the existence of
> src/backend/utils/adt/inet_net_ntop.c

Yeah, that is nice, but we are calling this from libpq, not the backend.
Let me work up a patch.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +