[LibPQ] Trying PQconnectStart: it doesn't seem to connect

From: Alessandro Agosto <the(dot)6one6(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: [LibPQ] Trying PQconnectStart: it doesn't seem to connect
Date: 2010-01-23 15:52:36
Message-ID: f1fcdeba1001230752h81a5131ub0f6a7cdf3e8d5d5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Jaśkiewicz 2010-01-23 16:05:59 Re: MySQL -> Postgres migration tools?
Previous Message Bob Pawley 2010-01-23 15:51:28 Re: Old/New