PQsetdbLogin() and PQconnectdb() fail on HPUX11i 64 bits with empty servername - Mailing list pgsql-interfaces

From Jan van der Weijde
Subject PQsetdbLogin() and PQconnectdb() fail on HPUX11i 64 bits with empty servername
Date
Msg-id 4B9C73D1EB78FE4A81475AE8A553B3C6078025@exch-lei1.attachmate.com
Whole thread Raw
Responses Re: PQsetdbLogin() and PQconnectdb() fail on HPUX11i 64 bits with empty servername  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PQsetdbLogin() and PQconnectdb() fail on HPUX11i 64 bits with empty servername  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
Hello all,
 
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:
 
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 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 functions succeed.
 
Can anyone help me?
 
Thank you,
Jan van der Weijde
 
 

pgsql-interfaces by date:

Previous
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: Progress of asynchronous queries
Next
From: "LLC"
Date:
Subject: Oracle only see's 'postgres' db and no schema's vi HSODBC