Re: Protocol question regarding Portal vs Cursor - Mailing list pgsql-hackers

From Dave Cramer
Subject Re: Protocol question regarding Portal vs Cursor
Date
Msg-id CADK3HHJ0imdGVe877XfGD7dpCNouvHNX9fcOa6Omet5ErEqpqg@mail.gmail.com
Whole thread Raw
In response to Re: Protocol question regarding Portal vs Cursor  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers

On Sat, 27 Jul 2024 at 19:06, Tatsuo Ishii <ishii@postgresql.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

pgsql-hackers by date:

Previous
From: Alena Rybakina
Date:
Subject: Re: POC, WIP: OR-clause support for indexes
Next
From: David Rowley
Date:
Subject: Re: Fix overflow in pg_size_pretty