pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Documentation bug / oversight
Date: Tue, 15 Dec 2015 08:52:23 +0100
Message-ID: <n4ogro$gdi$1@ger.gmane.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (2+ messages)  latest in thread

Message-ID: <n4ogro$gdi$1@ger.gmane.org>
Permalink:  ../n4ogro$gdi$1@ger.gmane.org/
Also on:    postgresql.org/message-id/n4ogro$gdi$1@ger.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: Documentation bug / oversight
  In-Reply-To: <n4ogro$gdi$1@ger.gmane.org>
  References: <n4ogro$gdi$1@ger.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox