Re: connecting with libpq interface

Vincent Predoehl <[email protected]>
Newsgroups gmane.comp.db.postgresql.interfaces
Message-ID <[email protected]>
On Jul 11, 2008, at 3:05 PM, Tom Lane wrote:

> Vincent Predoehl <[email protected]> writes:
>> I am using libpqxx, which is built on libpq and it gives me this
>> detailed message, so I ran the above test program to determine if it
>> was libpqxx or libpq.  Apparently, libpq is not connecting for some
>> reason:
>
>> terminate called after throwing an instance of  
>> 'pqxx::broken_connection'
>>    what():  could not connect to server: No such file or directory
>>          Is the server running locally and accepting
>>          connections on Unix domain socket "/var/run/
>> postgresql/.s.PGSQL.5432"?
>
> PQerrorMessage() should give you the same info in your standalone
> libpq program.

Yes it does:

could not connect to server: No such file or directory
         Is the server running locally and accepting
         connections on Unix domain socket "/var/run/ 
postgresql/.s.PGSQL.5432"?


>
> What I'd wonder is whether the postmaster is using that socket  
> location
> or not.  The more common location is /tmp/.s.PGSQL.5432.  You might  
> have
> a problem with having a copy of libpq that has a different default
> socket path compiled into it than the postmaster does.
>
> 			regards, tom lane


Do you know where can I find that in the source code?  I used the  
8.3.3 source from postgresql.org.  I did use apt-get to install the  
source, but I had trouble with the dev headers when I did that.  I  
noticed some bin files in /usr/local/pgsql/bin hung around after  
doing apt-get remove, but I'm pretty sure the install that is being  
used is from the build/install of the 8.3.3 source.

-- 
Vincent


-- 
Sent via pgsql-interfaces mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.