Re: PQisBusy() always returns TRUE
| От | Tom Lane |
|---|---|
| Тема | Re: PQisBusy() always returns TRUE |
| Дата | |
| Msg-id | 10130.1105811127@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | PQisBusy() always returns TRUE (ntinos@aueb.gr) |
| Ответы |
Re: PQisBusy() always returns TRUE
|
| Список | pgsql-general |
ntinos@aueb.gr writes:
> if (PQconsumeInput(conn)!=1) elog(ERROR,"Error in consume...");
> else
> {
> elog(INFO,"OK with PQconsumeInput");
> //Will use a cursor and 'while' later when this
> //will have been fixed...
> if (!PQisBusy(conn))
> {
> res=PQgetResult(conn);
> }
> else elog(INFO,"It is too busy to give me the results!");
> }
PQconsumeInput has to be part of the loop. PQisBusy doesn't change any
state, it just tells you whether PQconsumeInput has collected a complete
query result yet.
regards, tom lane
В списке pgsql-general по дате отправления: