Proposal to allow setting cursor options on Portals

Dave Cramer <davecramer@gmail.com>

From: Dave Cramer <davecramer@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-07T14:37:34Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix distinctness check for queries with grouping sets

Attachments

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