Re: Extended Query, flush or sync ?

Поиск
Список
Период
Сортировка
От Raimon Fernandez
Тема Re: Extended Query, flush or sync ?
Дата
Msg-id 8B2FDB4A-81E9-4307-8652-4C56EEAD2B18@montx.com
обсуждение исходный текст
Ответ на Re: Extended Query, flush or sync ?  (John DeSoi <desoi@pgedit.com>)
Ответы Re: Extended Query, flush or sync ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 19/12/2009, at 16:32, John DeSoi wrote:

>> 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. 

Yes, I'm using a named portal.

The new question is:

When I get the PortalSuspended, I get the 1000 rows, and for fetching the others, I have to send a new Execute to the
samePortal: 

"If Execute terminates before completing the execution of a portal (due to reaching a nonzero result- row count), it
willsend a PortalSuspended message; the appearance of this message tells the frontend that another Execute should be
issuedagainst the same portal to complete the operation. " 

But the portal isn't destroyed after a sync ?

I'm getting a "Portal 'myPortal' doesn't exist  "when sending the next Execute ...



1. Parse the Select with some $1, $2

2. Send a Bind + Describe + Execute + Sync

3. received the portalSuspended

4. Send the Execute

5. Receive the error "Portal 'myPortal' doesn't exist "


thanks,


regards,


raimon

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

Предыдущее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: postgres: writer process,what does this process actually do?
Следующее
От: Raimon Fernandez
Дата:
Сообщение: Extended Query vs Simple Query