setFetchSize - Mailing list pgsql-jdbc

From fschmidt
Subject setFetchSize
Date
Msg-id 1319525123309-4935215.post@n5.nabble.com
Whole thread Raw
Responses Re: setFetchSize
List pgsql-jdbc
Usage of setFetchSize() is described here:

http://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor

These restrictions make it difficult to use.  Many applications (including
mine) use one connection for many tasks within a thread.  So even after
turning autocommit off, there is still a chance what while I am reading my
result set, the same connection will be used somewhere else and commit()
will be called which will break the result set.

Clearly the ideal is to allow setFetchSize() to work across commits.  I
don't understand why this is a problem.  Postgres allows one to declare
cursors WITH HOLD to work across transactions.  Why can't the JDBC driver
use this?


--
View this message in context: http://postgresql.1045698.n5.nabble.com/setFetchSize-tp4935215p4935215.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

pgsql-jdbc by date:

Previous
From: Ana Carolina Comandulli
Date:
Subject: revision of the translation to pt_BR
Next
From: Oliver Jowett
Date:
Subject: Re: setFetchSize