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

From: Anton Maksimenkov <anton200(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: consequent PQsendQueryPrepared() failed: another command is already in progress
Date: 2010-06-17 05:21:11
Message-ID: AANLkTilgPIc8nEY6i3ckoqGrZkqvS7qBlLsBL2LA_9Cr@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/6/16 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2010-06-17 06:02:46 Re: world meaningful date time input
Previous Message Scott Marlowe 2010-06-17 02:51:30 Re: world meaningful date time input