Re: A question about libpgxx

From: jtv(at)xs4all(dot)nl
To: "Randy Yates" <yates(at)ieee(dot)org>
Cc: "H(dot) Hodzic" <hodzicsh(at)bih(dot)net(dot)ba>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: A question about libpgxx
Date: 2005-01-31 04:34:21
Message-ID: 13279.202.47.227.16.1107146061.squirrel@202.47.227.16
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

> I am finding it is not. Either that or I'm setting it up incorrectly.
>
> 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".

Here's the documentation on how to specify the parameters of the
connection. This is from the libpq documentation:

http://www.postgresql.org/docs/7.3/static/libpq-connect.html

> host
>
> Name of host to connect to. If this begins with a slash, it specifies
Unix-domain communication rather than TCP/IP communication; the value
is the name of the directory in which the socket file is stored. The
default is to connect to a Unix-domain socket in /tmp.
>
> hostaddr
>
> IP address of host to connect to. This should be in standard
numbers-and-dots form, as used by the BSD functions inet_aton et al.
If a nonzero-length string is specified, TCP/IP communication is
used.

Therefore, using a hostname like xyz.org (is that a preconfigured "please
edit me" default?) with hostaddr is clearly wrong--the option is meant for
numeric IP addresses only, for the specific case that you don't wish to
allow hostname lookups. Using "host" instead of "hostaddr" (or simply
setting the PGHOST environment variable instead) is going to fix at least
that side of the problem.

Jeroen

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Satheesh Mani 2005-01-31 19:10:09 Re: PGXML
Previous Message jtv 2005-01-31 04:09:05 Re: A question about libpgxx