Anton Maksimenkov <anton...@gmail.com> 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@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general