Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux