X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id F2D8E9DCA72 for ; Thu, 22 Dec 2005 17:35:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59098-09 for ; Thu, 22 Dec 2005 17:35:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from office.nextbus.com (office.nextbus.com [64.142.39.200]) by postgresql.org (Postfix) with ESMTP id 48F459DC8D9 for ; Thu, 22 Dec 2005 17:35:10 -0400 (AST) Received: from [192.168.15.200] (pool-70-16-57-200.syr.east.verizon.net [70.16.57.200]) by office.nextbus.com (Postfix) with ESMTP id 9B9AE384423; Thu, 22 Dec 2005 13:35:11 -0800 (PST) Message-ID: <43AB1C0D.7050305@nextbus.com> Date: Thu, 22 Dec 2005 16:35:09 -0500 From: Mike Charnoky User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Oliver Jowett Cc: pgsql-jdbc@postgresql.org Subject: Re: Driver compatibility with 7.3 server References: <43AAE613.10903@nextbus.com> <43AB167D.4060209@opencloud.com> In-Reply-To: <43AB167D.4060209@opencloud.com> X-Enigmail-Version: 0.91.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200512/113 X-Sequence-Number: 14444 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