Re: How to use JDBC to update LargeObject - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: How to use JDBC to update LargeObject
Date
Msg-id alpine.BSO.2.00.1001211018050.25745@leary.csoft.net
Whole thread Raw
In response to Re: How to use JDBC to update LargeObject  ("Satish Burnwal (sburnwal)" <sburnwal@cisco.com>)
Responses Re: How to use JDBC to update LargeObject  ("Satish Burnwal (sburnwal)" <sburnwal@cisco.com>)
List pgsql-jdbc

On Thu, 21 Jan 2010, Satish Burnwal (sburnwal) wrote:

> Even setBlob() method seems to be updating large object only partially.

If you want to reuse an existing blob you need to truncate it first:

http://java.sun.com/javase/6/docs/api/java/sql/Blob.html#truncate(long)

Note that there is a bug with truncate in all but the CVS JDBC drivers
that prevents you from truncating a blob to zero length.  Released
drivers can only truncate down to one byte, but that's probably fine for
you at the moment.

Kris Jurka


pgsql-jdbc by date:

Previous
From: Saurabh Jain
Date:
Subject: Java equivalent data type for chkpass.
Next
From: Kris Jurka
Date:
Subject: Re: Java equivalent data type for chkpass.