pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: fschmidt <fschmidt@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: setFetchSize
Date: Mon, 24 Oct 2011 23:45:23 -0700 (PDT)
Message-ID: <1319525123309-4935215.post@n5.nabble.com> (raw)

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.



view thread (40+ messages)  latest in thread

Message-ID: <1319525123309-4935215.post@n5.nabble.com>
Permalink:  ../1319525123309-4935215.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1319525123309-4935215.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: fschmidt@gmail.com
  Subject: Re: setFetchSize
  In-Reply-To: <1319525123309-4935215.post@n5.nabble.com>
  References: <1319525123309-4935215.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox