Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and

From: Martin Holz <holz(at)fiz-chemie(dot)de>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and
Date: 2004-01-09 17:07:53
Message-ID: 200401091807.53274.holz@fiz-chemie.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-jdbc

On Friday 09 January 2004 17:18, Kris Jurka wrote:

> I was referring to the documentation for setBinaryStream. You
> mentioned that it should throw an Exception if it couldn't read
> "length" bytes from the stream. I was commenting that our
> implementation might be wrong by checking the length at all.

Sorry for not being precise. There are two different issues.
1) The way the InputStream is read is clearly wrong.
This should be fixed.
2) What to do, when the size of the input stream does
not match the lenght argument of Statement.setBinaryStream()
There are two options
a) Throw a exception
b) Silently send all bytes, that are available.

I don't really understand what the length argument is good for
and think, that this is a design flaw made by Sun. I would prefer
a), but I am not sure here.

Martin

--
Martin Holz <holz(at)fiz-chemie(dot)de>

Softwareentwicklung / Vernetztes Studium - Chemie
FIZ CHEMIE Berlin
Franklin Str. 11
D-10587 Berlin

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Esh, Andrew 2004-01-09 17:14:14
Previous Message Kris Jurka 2004-01-09 16:18:27 Re: jdbc1.AbstractJdbc1Statement.setBinaryStream bug and

Browse pgsql-jdbc by date

  From Date Subject
Next Message Paul Thomas 2004-01-09 18:49:19 Re: [BUG] - Invalid UNICODE character sequence found(0xc000)
Previous Message Barry Lind 2004-01-09 17:06:23 Re: PreparedStatement parameters and mutable objects