libpq - PQsendQuery wait for complete result

Поиск
Список
Период
Сортировка
От icholy
Тема libpq - PQsendQuery wait for complete result
Дата
Msg-id 1354207206669-5734111.post@n5.nabble.com
обсуждение исходный текст
Ответы Re: libpq - PQsendQuery wait for complete result  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-general
I'm having problem with libpq's *PQexec* function hanging on intermittent
connections.
After searching around, the solution seems to be to use the asynchronous
functions *PQsendQuery*/*PQgetResult* and implement your own timeout.

Now the issue I'm facing is that *PQgetResult* needs to be called multiple
times until it returns *null* and then you know it's done.
However, the rest of my application expects a single *PQresult* object per
query.

So my question is:

*A.* Is there a way to concatenate/join the multiple *PQresults*?
*B. *Can I somehow use *PQisBusy* & *PQconsumeInput* to wait until all the
results are ready before calling *PQgetResult*?



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/libpq-PQsendQuery-wait-for-complete-result-tp5734111.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


В списке pgsql-general по дате отправления:

Предыдущее
От: Zdeněk Bělehrádek
Дата:
Сообщение: Re: youtube video on pgsql integrity
Следующее
От: Peter Kroon
Дата:
Сообщение: Re: set value var via execute