Re: libpq's error messages not working as before - Mailing list pgsql-hackers

From Tom Lane
Subject Re: libpq's error messages not working as before
Date
Msg-id 2532.1048031120@sss.pgh.pa.us
Whole thread Raw
In response to libpq's error messages not working as before  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> When I connect to a non-existing server over Unix-domain sockets I now
> simply get

> createdb: could not connect to database template1: could not create socket: No such file or directory

I'm not getting quite that behavior --- how did you invoke it exactly?

But I agree that the error message is broken in the IPv6 code.  On a
machine with no IPv6 support (HPUX 10.20), I still get the right thing
from CVS tip:

$ createdb -p 7777
psql: could not connect to server: No such file or directory       Is the server running locally and accepting
connectionson Unix domain socket "/tmp/.s.PGSQL.7777"?
 
createdb: database creation failed
$

But with the IPv6 code compiled (Red Hat 8.0), the error message is the
wrong one (it's for TCP not Unix connections):

$ createdb -p 7777
psql: could not connect to server: No such file or directory       Is the server running on host ??? and accepting
TCP/IP connections on port 7777?
 
createdb: database creation failed
$

I noticed this some weeks ago, but had not got round to investigating yet.
        regards, tom lane


pgsql-hackers by date:

Previous
From: R Blake
Date:
Subject: Re: anyone? CREATELANG in pgsql 7.3.2 failing
Next
From: Hiroshi Inoue
Date:
Subject: Re: cursors outside transactions