Re: Can Execute commands for different portals interleave?

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Evgeny Smirnov <evgeny(dot)v(dot)smirnov(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Can Execute commands for different portals interleave?
Date: 2024-03-14 10:53:48
Message-ID: 1915c800-2c49-4039-a840-7cafc0654fe4@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2024-03-14 10:55:34 Re: BitmapHeapScan streaming read user and prelim refactoring
Previous Message Shlok Kyal 2024-03-14 10:50:55 Re: Add publisher and subscriber to glossary documentation.