Dave Cramer <davecramer@gmail.com> writes: > If we use a Portal it is possible to open the portal and do a describe and > then Fetch N records.
> Using a Cursor we open the cursor. Is there a corresponding describe and a > way to fetch N records without getting the fields each time. Currently we > have to send the SQL "fetch <direction> N" and we get the fields and the > rows. This seems overly verbose.
Portals and cursors are pretty much the same thing, so why not use the API that suits you better?
So in this case this is a refcursor. Based on above then I should be able to do a describe on the refcursor and fetch using the extended query protocol
Is it possible to describe a CURSOR
Testing out the above hypothesis
2024-07-25 15:55:39 FINEST org.postgresql.core.v3.QueryExecutorImpl sendSimpleQuery FE=> SimpleQuery(query="declare C_3 CURSOR WITHOUT HOLD FOR SELECT * FROM testsps WHERE id = 2")