Proposal to allow setting cursor options on Portals - Mailing list pgsql-hackers

From Dave Cramer
Subject Proposal to allow setting cursor options on Portals
Date
Msg-id CADK3HHKe1PA1U6aB5-7tWBQ0yZGgNvY7H=ECDD9955Pas_zx_Q@mail.gmail.com
Whole thread Raw
Responses Re: Proposal to allow setting cursor options on Portals
Re: Proposal to allow setting cursor options on Portals
List 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

pgsql-hackers by date:

Previous
From: Jelte Fennema-Nio
Date:
Subject: Re: Always show correct error message for statement timeouts, fixes random buildfarm failures
Next
From: Akshat Jaimini
Date:
Subject: Re: Always show correct error message for statement timeouts, fixes random buildfarm failures