pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Charnoky <noky@nextbus.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Driver compatibility with 7.3 server
Date: Thu, 22 Dec 2005 16:35:09 -0500
Message-ID: <43AB1C0D.7050305@nextbus.com> (raw)
In-Reply-To: <43AB167D.4060209@opencloud.com>
References: <43AAE613.10903@nextbus.com>
	<43AB167D.4060209@opencloud.com>

Thank you for the feedback.  I was finally able to get this working
successfully using the 7.4 JDBC driver with the 7.3 server.  The tricky
part I found out was that you have to set autocommit off
(Connection.setAutoCommit(false)).  Once I did so, my memory usage went
down drastically!


Mike

Oliver Jowett wrote:
> Mike Charnoky wrote:
> 
>> Hi everyone, happy holidays!  We are are currently using Postgresql 7.3
>> and would like to be able to use cursors for large selects (ie: using
>> Statement.setFetchSize()).  Unfortunately, this is not implemented in
>> the 7.3 JDBC driver.  Is it possible to use a newer version of the JDBC
>> driver, say 7.4, with the 7.3 version of the db server?  Thanks.
> 
> 
> Later driver versions should work fine with a 7.3 server .. but ..
> 
> The setFetchSize() / cursor support in recent drivers (8.0 or later)
> only turns on if the v3 wire protocol is being used. 7.3 servers don't
> support v3, so it's not going to help your particular case.
> 
> For a while, the driver would rewrite queries to use DECLARE rather than
> using the v3 protocol facilities, which also works under v2 (but is
> somewhat more fragile). IIRC, this was done in the 7.4 series. So you
> could try an older, 7.4-era, driver and it might do the trick.
> 
> -O



view thread (4+ messages)

Message-ID: <43AB1C0D.7050305@nextbus.com>
Permalink:  ../43AB1C0D.7050305@nextbus.com/
Also on:    postgresql.org/message-id/43AB1C0D.7050305@nextbus.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: noky@nextbus.com, oliver@opencloud.com
  Subject: Re: Driver compatibility with 7.3 server
  In-Reply-To: <43AB1C0D.7050305@nextbus.com>
  References: <43AAE613.10903@nextbus.com> <43AB167D.4060209@opencloud.com> <43AB1C0D.7050305@nextbus.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