Re: Protocol question regarding Portal vs Cursor

From: Dave Cramer <davecramer(at)gmail(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: david(dot)g(dot)johnston(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Protocol question regarding Portal vs Cursor
Date: 2024-07-28 10:30:02
Message-ID: CADK3HHJ0imdGVe877XfGD7dpCNouvHNX9fcOa6Omet5ErEqpqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 27 Jul 2024 at 19:06, Tatsuo Ishii <ishii(at)postgresql(dot)org> wrote:

> > Yes, sorry, I should have said one can not create a with hold portal
> using
> > the BIND command
>
> Ok.
>
> It would be possible to add a new parameter to the BIND command to
> create such a portal. But it needs some changes to the existing
> protocol definition and requires protocol version up, which is a major
> pain.
>

I'm trying to add WITH HOLD to the JDBC driver and currently I would have
1) rewrite the query
2) issue a new query ... declare .. and bind variables to that statement
3) execute fetch

vs

1) bind variables to the statement
2) execute fetch

The second can be done much lower in the code.

However as you mentioned this would require a new protocol version which is
unlikely to happen.

Dave

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2024-07-28 10:34:49 Re: Fix overflow in pg_size_pretty
Previous Message Alena Rybakina 2024-07-28 09:59:32 Re: POC, WIP: OR-clause support for indexes