Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 15228B5DDAB for ; Tue, 25 Oct 2011 03:45:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 44082-03-5 for ; Tue, 25 Oct 2011 06:45:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mail.postgresql.org (Postfix) with ESMTP id DB7F0B5DD84 for ; Tue, 25 Oct 2011 03:45:23 -0300 (ADT) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1RIalH-0000Ni-AM for pgsql-jdbc@postgresql.org; Mon, 24 Oct 2011 23:45:23 -0700 Date: Mon, 24 Oct 2011 23:45:23 -0700 (PDT) From: fschmidt To: pgsql-jdbc@postgresql.org Message-ID: <1319525123309-4935215.post@n5.nabble.com> Subject: setFetchSize MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.767 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01, URI_HEX=1.122 X-Spam-Level: X-Archive-Number: 201110/58 X-Sequence-Number: 22311 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.