| From: | Dave Cramer <davecramer(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Proposal to allow setting cursor options on Portals |
| Date: | 2025-12-07 14:37:34 |
| Message-ID: | CADK3HHKe1PA1U6aB5-7tWBQ0yZGgNvY7H=ECDD9955Pas_zx_Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Greetings,
My main driver here is to allow the creation of Holdable portals at the
protocol level for drivers. Currently the only way to create a holdable
cursor is at the SQL level.
DECLARE liahona CURSOR WITH HOLD FOR SELECT * FROM films;
The JDBC driver has an option in the API to have result sets survive
commits see
https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#createStatement-int-int-int-
Doing this at the protocol level is the correct way to do this as modifying
the SQL to create a cursor is very cumbersome and we already have existing
code to create a portal. Adding the ability to specify options
Looking for feedback.
Dave Cramer
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-wip-holdable-portals.patch | application/octet-stream | 19.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Akshat Jaimini | 2025-12-07 14:38:59 | Re: Always show correct error message for statement timeouts, fixes random buildfarm failures |
| Previous Message | Jelte Fennema-Nio | 2025-12-07 14:32:56 | Re: Always show correct error message for statement timeouts, fixes random buildfarm failures |