Search Postgresql Archives

Re: PQisBusy() always returns TRUE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ntinos@xxxxxxx 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux