Re: Extended Query, flush or sync ?

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: Extended Query, flush or sync ?
Дата
Msg-id 1224664A-9C2B-4CE2-888C-7F50F7556BBD@pgedit.com
обсуждение исходный текст
Ответ на Re: Extended Query, flush or sync ?  (Raimon Fernandez <coder@montx.com>)
Ответы Re: Extended Query, flush or sync ?  (Raimon Fernandez <coder@montx.com>)
Re: Extended Query, flush or sync ?  (Raimon Fernandez <coder@montx.com>)
Список pgsql-general
On Dec 19, 2009, at 2:40 AM, Raimon Fernandez wrote:

>> I send:
>>
>> parse
>> bind
>> describe
>> execute
>> sync
>>
>> and then loop on the connection stream to receive the responses.
>
> And do you get the parseComplete after sending the parse or after sending the sync ?

I don't really know or care. I send the entire sequence above and then read the results handling each possible case. In
otherwords, I don't read anything after each message; I only read after sending the sync. 

> And also from the docs:
>
> "If Execute terminates before completing the execution of a portal (due to reaching a nonzero result- row count), it
willsend a PortalSuspended message; t 
> he appearance of this message tells the frontend that another Execute should be issued against the same portal to
completethe operation. " 
>
> If I execute with a row limit of 1000, and I know there are more than 1000 rows, I get the portalSuspended as
described.
>
> But, If a issue a new Execute, postgresql says that myPortal doesn't exist anymore.
>
> How I can get those 1000 rows ?

Are you using a named portal? Are you reading all responses until you receive a ready for query response? There are a
lotof details - it really helped me to look at the psql source. 



John DeSoi, Ph.D.





В списке pgsql-general по дате отправления:

Предыдущее
От:
Дата:
Сообщение: unsubscribe
Следующее
От: Raimon Fernandez
Дата:
Сообщение: Re: Extended Query, flush or sync ?