From: SJ Kissane <skissane@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Bug in AbstractJdbc2BlobClob
Date: Fri, 15 Jan 2010 12:27:21 +1100
Message-ID: <82fa66381001141727l36ea4936g445e0c0ca7592f3e@mail.gmail.com> (raw)
Hi everyone
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
replace with a new assertLength(len)?
(I am not on list so please reply direct; I hope this gets through to you
though...)
Cheers
Simon
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: skissane@gmail.com
Subject: Re: Bug in AbstractJdbc2BlobClob
In-Reply-To: <82fa66381001141727l36ea4936g445e0c0ca7592f3e@mail.gmail.com>
References: <82fa66381001141727l36ea4936g445e0c0ca7592f3e@mail.gmail.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