Async PQgetResult() question.

Поиск
Список
Период
Сортировка
От Matthew Hagerty
Тема Async PQgetResult() question.
Дата
Msg-id 5.0.2.1.2.20010706225537.0233bd90@pop.voyager.net
обсуждение исходный текст
Ответы Re: Async PQgetResult() question.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Greetings,

I'm working with pqlib in asynchronous mode and I have a question about 
PQgetResult.  I have this situation:

submit a query via PQsendQuery()
flush to the backend with PQflush()

set my read descriptor on the socket and enter a select()

select returns read_ready on the socket, so call PGconsumeInput()
PQisBusy() returns zero, so call PQgetResult()
PQgetResult() returns a pointer so do whatever with the result
call PQclear() on the result

Now what do I do?  The docs say that in async mode that PQgetResult() must 
be called until it returns NULL.  But, how do I know that calling 
PQgetResult() a second, third, fourth, etc. time will not block?  When 
PQisBusy() returns zero, does that mean that PQgetResult() is guaranteed 
not to block for all results, i.e. until it returns NULL and a new query is 
issued?

Thanks,
Matthew



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

Предыдущее
От: Alex Pilosov
Дата:
Сообщение: RE: New SQL Datatype RECURRINGCHAR
Следующее
От: Lincoln Yeoh
Дата:
Сообщение: Re: [GENERAL] Vacuum and Transactions