X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C4DC78B9CDF for ; Mon, 31 Jan 2005 15:00:02 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77478-09 for ; Mon, 31 Jan 2005 14:59:52 +0000 (GMT) Received: from www.postgresql.com (unknown [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id 119058B9B44 for ; Mon, 31 Jan 2005 14:49:56 +0000 (GMT) Received: from smtp-vbr4.xs4all.nl (smtp-vbr4.xs4all.nl [194.109.24.24]) by www.postgresql.com (Postfix) with ESMTP id 78DF59A7E50 for ; Mon, 31 Jan 2005 04:02:36 +0000 (GMT) Received: from webmail.xs4all.nl (webmail11.xs4all.nl [194.109.22.171]) by smtp-vbr4.xs4all.nl (8.12.11/8.12.11) with ESMTP id j0V4227D048349; Mon, 31 Jan 2005 05:02:02 +0100 (CET) (envelope-from jtv@xs4all.nl) Received: from 202.47.227.16 by webmail.xs4all.nl with HTTP; Mon, 31 Jan 2005 05:09:05 +0100 (CET) Message-ID: <15363.202.47.227.16.1107144545.squirrel@202.47.227.16> In-Reply-To: References: <41FC374C.7060607@bih.net.ba> Date: Mon, 31 Jan 2005 05:09:05 +0100 (CET) Subject: Re: A question about libpgxx From: jtv@xs4all.nl To: "Randy Yates" Cc: "H. Hodzic" , pgsql-interfaces@postgresql.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.228 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200501/17 X-Sequence-Number: 5243 > 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