JSR, under-specified Blob.setBytes(...) ? - Mailing list pgsql-jdbc

From Marc Herbert
Subject JSR, under-specified Blob.setBytes(...) ?
Date
Msg-id 20050816094639.GC30571@emicnetworks.com
Whole thread Raw
In response to Re: Missing functionality in ResultSetMetaData ?  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
On Wed, Aug 10, 2005 at 08:46:25AM -0400, Dave Cramer wrote:
> >
> >Perhaps we can make some use of Dave's Sun contacts from his CTS work?
> >Even if not it wouldn't be a bad idea to get all of the questions
> >we've
> >got for Sun into one place.  What else do we have other than the
> >getColumnDisplaySize() < 0 issue?
> >
> I'd be more than happy to, can we get all the questions in one place
> so that we can ask them all at once.

"Blob.setBytes(...)" methods are under-specified IMHO.  But maybe it
was on purpose, to let the door open for each DBMS to have its own
and different interpretation adapted to its specific constraints.
The return value (number of bytes successfully written) seems to be an
indication of that; it looks like: "in corner cases, weird things can
happen, so you'd better check everything you wanted was written".

- When we don't write until the end of the Blob, do we keep the tail as is?
  Yes looks like the most sensible answer, but a comment about this would not harm.
- On the other hand, what happens if the pre-existing Blob is too small,
  is it extended?
   - if it's extended, how are initialized bytes < pos ?




pgsql-jdbc by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: Memory leak in 8.0 JDBC driver?
Next
From: Oliver Jowett
Date:
Subject: Re: Missing functionality in ResultSetMetaData ?