[LibPQ] Trying PQconnectStart: it doesn't seem to connect - Mailing list pgsql-general

From Alessandro Agosto
Subject [LibPQ] Trying PQconnectStart: it doesn't seem to connect
Date
Msg-id f1fcdeba1001230752h81a5131ub0f6a7cdf3e8d5d5@mail.gmail.com
Whole thread Raw
Responses Re: [LibPQ] Trying PQconnectStart: it doesn't seem to connect  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
Hi,
i'm a python/c developer and i need an asynchronous (python) interface to communicate with a database. I like PostgreSQL so i'm trying to write a mock-up for a python extension module to use LibPQ in my asynchronous programs.

I've started to study the docs about libpq just yesterday, so if i mistake something please correct me.
I'm writing the connection function, using the api PQconnectStart but verifing the status of this call i get that the condition PQstatus(connection) != CONNECTION_OK (the connection must return CONNECTION_OK) is failed so my program exits. Using instead of it the PQconnectiondb all work as expected, but not using this api.

Can someone tell me what i wrong? And if you know some resource that explains with an example how i should to verify the connection during the select/poll, would be appreciated.

Thank you,
Alex.
--
Alessandro A.

pgsql-general by date:

Previous
From: "Bob Pawley"
Date:
Subject: Re: Old/New
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: MySQL -> Postgres migration tools?