pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedBug in AbstractJdbc2BlobClob
2+ messages / 2 participants
[nested] [flat]
* Bug in AbstractJdbc2BlobClob
@ 2010-01-15 01:27 SJ Kissane <skissane@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: SJ Kissane @ 2010-01-15 01:27 UTC (permalink / raw)
To: pgsql-jdbc
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Bug in AbstractJdbc2BlobClob
@ 2010-01-18 07:49 Kris Jurka <books@ejurka.com>
parent: SJ Kissane <skissane@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Kris Jurka @ 2010-01-18 07:49 UTC (permalink / raw)
To: SJ Kissane <skissane@gmail.com>; +Cc: pgsql-jdbc
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-01-18 07:49 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-01-15 01:27 Bug in AbstractJdbc2BlobClob SJ Kissane <skissane@gmail.com>
2010-01-18 07:49 ` Kris Jurka <books@ejurka.com>
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