Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 723E7655B90 for ; Mon, 18 Jan 2010 04:37:08 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 11243-01-6 for ; Mon, 18 Jan 2010 08:36:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail.postgresql.org (Postfix) with ESMTP id 56709659DC3 for ; Mon, 18 Jan 2010 03:49:21 -0400 (AST) Received: by leary.csoft.net (Postfix, from userid 1112) id 69321A373; Mon, 18 Jan 2010 02:49:19 -0500 (EST) Date: Mon, 18 Jan 2010 02:49:19 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: SJ Kissane cc: pgsql-jdbc@postgresql.org Subject: Re: Bug in AbstractJdbc2BlobClob In-Reply-To: <82fa66381001141727l36ea4936g445e0c0ca7592f3e@mail.gmail.com> Message-ID: References: <82fa66381001141727l36ea4936g445e0c0ca7592f3e@mail.gmail.com> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.539 tagged_above=-10 required=5 tests=AWL=0.060, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/37 X-Sequence-Number: 20233 On Fri, 15 Jan 2010, SJ Kissane wrote: > I'm using JDBC4 Postgresql Driver, Version 8.4-701. > > Using pgJDBC, if you call clob.truncate(0) to truncate a clob to > zero-length, you get a "org.postgresql.util.PSQLException: LOB positioning > offsets start at 1". > This is spurious -- the argument to truncate is not a position offset, its a > length. So although position offsets must start at 1, lengths can start at > 0. > I see there is a call to assertPosition(len) -- that needs to go, maybe You are correct. Fixed in CVS for 8.3, 8.4, and HEAD. Kris Jurka