From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Carlos Hasan <chasan(at)acepta(dot)com> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: PQerrorMessage() bug? |
Date: | 2004-10-01 23:13:30 |
Message-ID: | 15825.1096672410@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Carlos Hasan <chasan(at)acepta(dot)com> writes:
> I think that found a weird bug when PQconnectdb() fails because I
> haven't started PostgreSQL. The function PQerrorMessage() returns the
> message:
> could not connect to server: <<<weird garbage here>>
> Is the server running locally and accepting
> connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.
> Looks like the error message wasn't properly formatted.
I think this is the known problem with GNU libc having a weird
(non-SUS-spec) strerror_r. There's a workaround in the 8.0 sources
but it doesn't look like anyone's backported it to 7.4. You can
drop the pqStrerror() code from CVS tip src/port/thread.c into 7.4
if you like (this will not work in general because 7.4 configure doesn't
set STRERROR_R_INT, but it should work for the case you want).
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Akbar Mokhtarani | 2004-10-04 02:58:50 | Array elements (urgent help needed) |
Previous Message | Akbar Mokhtarani | 2004-10-01 23:06:46 | Accessing array elements |