X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 21BC5D1B266 for ; Fri, 21 May 2004 02:16:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 71668-04 for ; Fri, 21 May 2004 02:15:46 -0300 (ADT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id DB271D1B196 for ; Fri, 21 May 2004 02:15:44 -0300 (ADT) Received: from flood.opencloud.co.nz ([192.168.0.31] helo=opencloud.com ident=oliver) by yass.opencloud.co.nz with esmtp (Exim 3.35 #1 (Debian)) id 1BR2Nf-0007vX-00; Fri, 21 May 2004 17:15:39 +1200 Message-ID: <40AD9077.7090905@opencloud.com> Date: Fri, 21 May 2004 17:15:35 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alban Mathieu Cc: pgsql-jdbc@postgresql.org Subject: Re: Driver JDBC3 build 213 for postgreSQL 7.4 References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/140 X-Sequence-Number: 10150 Alban Mathieu wrote: > Hi, > > I got some troubles with the jdbc driver build 213 for postgreSQL 7.4 > The method ResultSet.getFetchSize() return always 0 > > I use now the driver for postgreSQL 7.3 and evrything is working fine... > > Any idea??? If you are expecting getFetchSize() to return the size of the resultset, that was nonstandard behaviour in the older driver. Newer drivers follow the JDBC API specification and return whatever was set by setFetchSize() (or an unspecified default value). To get the resultset size portably, try something like: PreparedStatement stmt = connection.prepareStatement("...", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); // .. set parameters .. ResultSet rs = stmt.executeQuery(); rs.last(); int resultSetSize = rs.getRow(); -O