Re: A question about libpgxx
От | jtv@xs4all.nl |
---|---|
Тема | Re: A question about libpgxx |
Дата | |
Msg-id | 15363.202.47.227.16.1107144545.squirrel@202.47.227.16 обсуждение исходный текст |
Ответ на | Re: A question about libpgxx (Randy Yates <yates@ieee.org>) |
Список | pgsql-interfaces |
> 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
В списке pgsql-interfaces по дате отправления: