On Wed, 7 Jan 2004, Martin Holz wrote:
> Hello, > > org.postgresql.jdbc1.AbstractJdbc1Statement.setBinaryStream() > in postgresql 7.4.1 wrongly assumes, that > java.io.InputStream.read(byte[] b,int offset,int len ) > will always read len bytes. InputStream only guarantees to > return at least 1 byte per call. The attached patch solves the bug. > I have applied a version of this patch to the cvs version on gborg. The setAsciiStream and setUnicodeStream methods also had this problem. Your patch was not quite right because it didn't correctly handle the situation where the Stream was longer than the given length. Kris Jurka ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster