Documentation bug / oversight

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Documentation bug / oversight
Date: 2015-12-15 07:52:23
Message-ID: n4ogro$gdi$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

The Postgres JDBC documentation regarding the use of setBinaryStream() for bytea columns states[1]:

The length parameter to setBinaryStream must be correct. There is no way to indicate that the stream is of unknown length.
If you are in this situation, you must read the stream yourself into temporary storage and determine the length.

I think this is no longer correct. Build 1200 introduced the ability to do just that[2]:

* Support for setBinaryStream with unknown length https://github.com/pgjdbc/pgjdbc/pull/220

My tests have shown that setBinaryStream(int, InputStream) indeed works just fine (as expected from the release notes)

Regards
Thomas

[1] https://jdbc.postgresql.org/documentation/94/binary-data.html#binary-data-example
[2] https://jdbc.postgresql.org/documentation/changelog.html#version_9.4-1200

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Philippe Marschall 2015-12-15 08:01:35 Re: timestamp with time zone wire format
Previous Message Thomas Kellerer 2015-12-15 07:23:26 Re: timestampdiff() implementation