Re: streaming result sets: progress - Mailing list pgsql-jdbc

From Scott Lamb
Subject Re: streaming result sets: progress
Date
Msg-id 3DD4EFEA.1030307@slamb.org
Whole thread Raw
In response to streaming result sets: progress  (Nic Ferrier <nferrier@tapsellferrier.co.uk>)
Responses Re: streaming result sets: progress  (nferrier@tapsellferrier.co.uk)
List pgsql-jdbc
First, my understanding is that cursors are only valid within the
transaction in which they were created. Is this correct?

If so, I can't use the cursor method exclusively. Some of my code needs
to be able to iterate over a resultset and execute whole transactions
based on it. With cursors, it would fail after the first iteration of
the loop.

 From the archives, Barry Lind's plan at one point was to not use
cursors unless setFetchSize() was used explicitly. [*] That would keep
existing code working. Or otherwise, they should not be used if I
specify ResultSet.HOLD_CURSORS_OVER_COMMIT; I could add that to my code
where it is important. If/when the backend changes to support holding
cursors over commit, then they could be used in all cases.

Does this sound reasonable?

Thanks,
Scott

[*] - <http://archives.postgresql.org/pgsql-jdbc/2002-07/msg00164.php>


pgsql-jdbc by date:

Previous
From: nferrier@tapsellferrier.co.uk
Date:
Subject: Re: streaming result sets: progress
Next
From: nferrier@tapsellferrier.co.uk
Date:
Subject: Re: streaming result sets: progress