Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id BF55A6330B7 for ; Mon, 30 Nov 2009 07:14:53 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 04883-04 for ; Mon, 30 Nov 2009 11:14:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.mnc.ch (62-2-77-205.static.cablecom.ch [62.2.77.205]) by mail.postgresql.org (Postfix) with ESMTP id BC78C632B13 for ; Mon, 30 Nov 2009 07:14:44 -0400 (AST) Received: from localhost (mail2.mnc.ch [127.0.0.1]) by mail.mnc.ch (Postfix) with ESMTP id E8E2D23088; Mon, 30 Nov 2009 11:14:40 +0000 (GMT) X-Virus-Scanned: amavisd-new at mnc.ch Received: from mail.mnc.ch ([127.0.0.1]) by localhost (mail2.mnc.ch [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id EBKQ2-ohbllT; Mon, 30 Nov 2009 11:14:40 +0000 (GMT) Received: from meuh.localdomain (62-2-77-204.static.cablecom.ch [62.2.77.204]) by mail.mnc.ch (Postfix) with ESMTP id 6EA6723086; Mon, 30 Nov 2009 11:14:40 +0000 (GMT) Received: by meuh.localdomain (Postfix, from userid 1000) id 5FBC611026E; Mon, 30 Nov 2009 12:14:40 +0100 (CET) To: hw@solvedirect.com Cc: pgsql-jdbc@postgresql.org Subject: Re: Upgrading jdbc References: <200911301052.14236.hw@solvedirect.com> From: Guillaume Cottenceau X-Hashcash: 1:20:091130:hw@solvedirect.com::M8jPBbIeFOedrcX2:00000000000000000000000000000000000000000004Py4 X-Hashcash: 1:20:091130:pgsql-jdbc@postgresql.org::QUOFCscl2asu5YFf:0000000000000000000000000000000000005s5a Date: Mon, 30 Nov 2009 12:14:40 +0100 In-Reply-To: <200911301052.14236.hw@solvedirect.com> (hw@solvedirect.com's message of "Mon\, 30 Nov 2009 10\:52\:14 +0100") Message-ID: <87hbscl0wv.fsf@meuh.mnc.lan> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/34 X-Sequence-Number: 20081 hw 'at' solvedirect.com writes: > Hello! > > I'm trying to upgrade to the current jdbc. > I tried both jdbc3 and jdbc4. > > Until now we've been using pg74.215.jdbc3.jar. > The code is using methods that need a ResultSet with a Type different than > TYPE_FORWARD_ONLY. In the 7.4-version this seems to be standard. > > For the new one I need to do: > PreparedStatement stmnt = > connection.prepareStatement(JDBCEscSeq.convertEscSeq(sqlStmnt, objs), > java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, > java.sql.ResultSet.CONCUR_READ_ONLY); > for the code to function as before. > > So far this works. Unfortunately the execution of some statements is > extremly slow. You may hit a problem with the protocol version 3 and prepared statements with variable parameters. http://archives.postgresql.org/pgsql-jdbc/2009-03/msg00027.php -- Guillaume Cottenceau