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

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: consequent PQsendQueryPrepared() failed: another command is already in progress
Дата
Msg-id
6768.1276699160@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
consequent PQsendQueryPrepared() failed: another command is already in progress Anton Maksimenkov <anton200@gmail.com>
Re: consequent PQsendQueryPrepared() failed: another command is already in progress Jeff Davis <pgsql@j-davis.com>
Re: consequent PQsendQueryPrepared() failed: another command is already in progress Yeb Havinga <yebhavinga@gmail.com>
Re: consequent PQsendQueryPrepared() failed: another command is already in progress Tom Lane <tgl@sss.pgh.pa.us>
Re: consequent PQsendQueryPrepared() failed: another command is already in progress Anton Maksimenkov <anton200@gmail.com>
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 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
В списке pgsql-general по дате отправления
От: Stephen Frost
Дата:
Сообщение: Re: GSS Authentication
От: sunpeng
Дата:
FAQ