[LibPQ] Trying PQconnectStart: it doesn't seem to connect
| От | Alessandro Agosto |
|---|---|
| Тема | [LibPQ] Trying PQconnectStart: it doesn't seem to connect |
| Дата | |
| Msg-id | f1fcdeba1001230752h81a5131ub0f6a7cdf3e8d5d5@mail.gmail.com обсуждение |
| Ответы |
Re: [LibPQ] Trying PQconnectStart: it doesn't seem to connect
|
| Список | 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.
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 по дате отправления: