Re: Can Execute commands for different portals interleave? - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Can Execute commands for different portals interleave?
Date
Msg-id 1915c800-2c49-4039-a840-7cafc0654fe4@iki.fi
Whole thread Raw
In response to Can Execute commands for different portals interleave?  (Evgeny Smirnov <evgeny.v.smirnov@gmail.com>)
List pgsql-hackers
On 14/03/2024 07:05, Evgeny Smirnov wrote:
> The question (a short version): is it possible for a client to send two 
> selects in the same transaction using the extended query protocol 
> (without declaring cursors) and pull rows simultaneously by means of 
> interleaving portal names and restricting fetch size in Execute commands.

Yes, that's possible.

Named portals created with the extended query protocol are the same as 
cursors, really. You can even use the Execute protocol message to fetch 
from cursor created with DECLARE CURSOR, or use FETCH command to fetch 
from a portal created with the Bind message.

-- 
Heikki Linnakangas
Neon (https://neon.tech)




pgsql-hackers by date:

Previous
From: Shlok Kyal
Date:
Subject: Re: Add publisher and subscriber to glossary documentation.
Next
From: Dilip Kumar
Date:
Subject: Re: BitmapHeapScan streaming read user and prelim refactoring