PQsetnonblocking questions
PQsetnonblocking questions
От:
"Tim Barnard" <tbarnard@povn.com>
Дата:
Hello everyone,
I'm running release 7.0.3 and discovered that the include file libpq-fe.h prototypes PQsetnonblocking as follows: int PQsetnonblocking(PGconn * conn, int arg)
However, the documentation shows it as: PQsetnonblocking(PGconn * conn).
Does nayone know what the extra argument "int arg" is for? And as my C app is not using a select statement to wait, do I even need to use PQsetnonblocking? I am using PQconsumeInput, PQsendQuery, PQisBusy and PQgetResult.
Tim
S.E. Mgr
Hartford Communications
Re: PQsetnonblocking questions
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Tim Barnard" writes: > ... do I even need to use PQsetnonblocking? Not unless you are unhappy about the possibility of short-term blocking during PQsendQuery (which is a very remote possibility anyway, unless you send huge query strings). I believe that the nonblocking-mode code is pretty buggy, and don't recommend using it unless you really need it and want to help debug it... regards, tom lane