Search Postgresql Archives

Re: consequent PQsendQueryPrepared() failed: another command is already in progress

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

 



Anton Maksimenkov <anton200@xxxxxxxxx> 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 calling PQgetResult until it returns NULL
before the connection is considered cleared and ready for another query.
In this example you should get a NULL on the very next call, but
you didn't make that call.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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