pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
PQerrorMessage() bug? 2+ messages / 2 participants [nested] [flat]
* PQerrorMessage() bug? @ 2004-09-28 00:11 Carlos Hasan <chasan@acepta.com> 0 siblings, 1 reply; 2+ messages in thread From: Carlos Hasan @ 2004-09-28 00:11 UTC (permalink / raw) To: pgsql-interfaces Hi, 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. It happens on Debian Linux "sarge" (with kernel 2.6.8) and PostgreSQL 7.4.5 (with libpq linked dynamically). It works fine under Red Hat Linux 7.3 and PostgreSQL 7.3.4 (ie. instead of <<weird garbage here>> and "/var/run/postgresql/.s.PGSQL. it says "No such file or directory" and "/tmp/.s.PGSQL.nnnn"? where nnnn is an integer). Any ideas of what could be the problem? Thanks, Carlos ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PQerrorMessage() bug? @ 2004-10-01 23:13 Tom Lane <tgl@sss.pgh.pa.us> parent: Carlos Hasan <chasan@acepta.com> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2004-10-01 23:13 UTC (permalink / raw) To: Carlos Hasan <chasan@acepta.com>; +Cc: pgsql-interfaces Carlos Hasan <chasan@acepta.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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-10-01 23:13 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2004-09-28 00:11 PQerrorMessage() bug? Carlos Hasan <chasan@acepta.com> 2004-10-01 23:13 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox