Bruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian <br...@momjian.us> writes: > > > I assume you are suggesting to use our inet_net_ntop() even if the > > > system has inet_ntop(). > > > > If you're going to have code to do the former, it doesn't seem to be > > worth the trouble to also have code that does the latter ... > > OK, we will not call inet_ntop() at all. I moved the CIDR part of > adt/inet_net_ntop.c into adt/inet_cidr_ntop.c, and moved the remaining > "net" part to /port/inet_net_ntop.c. > > I then changed all uses of inet_ntoa to use inet_net_ntop(). While this > churn would perhaps not be warranted just to allow for better error > messages, I found pg_getaddrinfo_all() being called from > libpq::connectDBStart(), which makes it not thread-safe. I am not > excited about backpatching it but it is a threading bug. > > The output is as expected: > > $ psql -h localhost test > psql: could not connect to server: Connection refused > Is the server running on host "localhost" (127.0.0.1) and > accepting > TCP/IP connections on port 5432? > $ psql -h 127.0.0.1 test > psql: could not connect to server: Connection refused > Is the server running on host "127.0.0.1" and accepting > TCP/IP connections on port 5432?
Applied. -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers