From: jtv@xs4all.nl
To: Randy Yates <yates@ieee.org>
Cc: H. Hodzic <hodzicsh@bih.net.ba>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: A question about libpgxx
Date: Mon, 31 Jan 2005 05:09:05 +0100 (CET)
Message-ID: <15363.202.47.227.16.1107144545.squirrel@202.47.227.16> (raw)
In-Reply-To: <llabuo6z.fsf@ieee.org>
References: <41FC374C.7060607@bih.net.ba>
<llabuo6z.fsf@ieee.org>
> I am finding it is not. Either that or I'm setting it up incorrectly.
Thankfully I'm pretty sure it's the latter! Otherwise you'd see test000
failing. If the problems start at test001 and everything fails after
that, that's a near-certain indicator that the connection to the database
is failing. Read on below.
> I've tried to run the test suite by executing "make check" and test001
> is bombing with different types of errors - timeout connection errors
> and "could not translate xyz.org to address".
This just means that your connection to the database isn't set up
correctly. It really doesn't have anything to do with libpqxx; the
underlying C library handles this part, and it needs to know which
database you wish to connect to. For the self-test the best choice is an
empty throwaway database that the test suite can play with.
As documented in the libpqxx README, you must make sure that there is a
database to connect to, and such that the test programs can log into it
using the default settings. That typically means your own username and no
password, but you can set the documented environment variables to change
these parameters.
In your case the problem appears to be the definition of the host that the
client library wants to connect to. On Unix, this would be fixed by
setting the environment variable PGHOST to either the IP address of the
database server, or an absolute filesystem path to a local server's
socket. The latter is likely to be different under Windows, so you may
have to do some documentation digging there.
Once you get the test running, beware that we've just run into a serious
bug in Visual C++ which causes test failures in large-object support. So
expect a few test cases to fail if you use any version of Visual C++.
This is a longstanding and particularly nasty compiler bug that has bitten
us before; the vendor appears to be unwilling to fix it. A workaround has
just been checked into CVS, so if you need large object support on
Windows, either use a different compiler or wait a few days for the 2.4.3
release.
Jeroen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: jtv@xs4all.nl, yates@ieee.org, hodzicsh@bih.net.ba
Subject: Re: A question about libpgxx
In-Reply-To: <15363.202.47.227.16.1107144545.squirrel@202.47.227.16>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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