I'm using PQsetdbLogin() or PQconnectdb() to connect to a local server
on an 64bits HP system with O/S HPUX11i. The PostgreSQL version is 8.1.4
According to the documentation I can leave out the host specification:
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 behavior when host is not specified is to connect to a
Unix-domain socket in /tmp (or whatever socket directory was specified
when PostgreSQL was built). On machines without Unix-domain sockets, the
default is to connect to localhost.
However when I do that, the client givers error message:
could not connect to server:
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
while the postmaster server log the first time:
LOG: getsockname() failed: Invalid argument
and any subsequent time:
LOG: incomplete startup packet
No other socket location was specified when PostgreSQL was built, so
both the client and the server should use /tmp
When I compile the client API as 32 bits code, the error does not occur.
When I do specify localhost or an actual server name both connect
Can anyone help me?
Jan van der Weijde
pgsql-interfaces by date
|Next:||From: LLC||Date: 2006-09-21 03:59:10|
|Subject: Oracle only see's 'postgres' db and no schema's vi HSODBC|
|Previous:||From: Jeroen T. Vermeulen||Date: 2006-09-19 03:03:04|
|Subject: Re: Progress of asynchronous queries|