Re: consequent PQsendQueryPrepared() failed: another command is already in progress - Mailing list pgsql-general

From Anton Maksimenkov
Subject Re: consequent PQsendQueryPrepared() failed: another command is already in progress
Date
Msg-id AANLkTilgPIc8nEY6i3ckoqGrZkqvS7qBlLsBL2LA_9Cr@mail.gmail.com
Whole thread Raw
In response to Re: consequent PQsendQueryPrepared() failed: another command is already in progress  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
2010/6/16 Tom Lane <tgl@sss.pgh.pa.us>:
>> 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.

Yes, thanks, that was exactly what I missed.

Thanks to all, guys.
--
antonvm

pgsql-general by date:

Previous
From: Bryan Montgomery
Date:
Subject: Re: GSS Authentication
Next
From: Dennis Gearon
Date:
Subject: Re: world meaningful date time input