Re: PQisBusy() always returns TRUE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ntinos(at)aueb(dot)gr
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PQisBusy() always returns TRUE
Date: 2005-01-15 17:45:27
Message-ID: 10130.1105811127@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

ntinos(at)aueb(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bo Lorentsen 2005-01-15 18:03:43 Index optimization ?
Previous Message Michael Fuhr 2005-01-15 17:35:04 Re: OID Usage