2010/6/16 Tom Lane :
>> But it success only at first time, and then fail with error:
>> ... "another command is already in progress"
>> [ PQsendQuery followed by just one PQgetResult ]
>
> IIRC, you need to keep calling PQgetResult until it returns NULL
> before the connection is considered cleared
On Wed, 2010-06-16 at 10:26 +0600, Anton Maksimenkov wrote:
> if ((res = PQgetResult(conn)) == NULL) {
> fprintf(stderr, "PQgetResult() res == NULL");
> PQfinish(conn);
> return -1;
> }
> if (PQresultStatus(res) != PGRES_TUPLES_OK) {
>
Anton Maksimenkov wrote:
I'm using libpq C Library. I prepared some query and trying to call it
many times.
But it success only at first time, and then fail with error:
... "another command is already in progress"
You are using the asynchronous queries while the testbed example program
does
Anton Maksimenkov writes:
> I'm using libpq C Library. I prepared some query and trying to call it
> many times.
> But it success only at first time, and then fail with error:
> ... "another command is already in progress"
> [ PQsendQuery followed by just one PQgetResult ]
IIRC, you need to keep
I'm using libpq C Library. I prepared some query and trying to call it
many times.
But it success only at first time, and then fail with error:
... "another command is already in progress"
Here is my testbed:
int
main (register int const argc, register char *const argv[])
{
PGconn