Re: libpq's error messages not working as before

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq's error messages not working as before
Date: 2003-03-18 23:45:20
Message-ID: 2532.1048031120@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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
connections on 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2003-03-19 00:00:24 Re: cursors outside transactions
Previous Message R Blake 2003-03-18 23:17:09 Re: anyone? CREATELANG in pgsql 7.3.2 failing