From: Kris Jurka <books@ejurka.com>
To: Alfredo Rico <alfredorico@gmail.com>
Cc: Russell Francis <rfrancis@ev.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: How to retieve binary data (bytea) without problem ?
Date: Thu, 29 Sep 2005 12:06:13 -0500 (EST)
Message-ID: <Pine.BSO.4.61.0509291201150.25137@leary.csoft.net> (raw)
In-Reply-To: <89cc056d05092906521f72f367@mail.gmail.com>
References: <89cc056d050928132714e17730@mail.gmail.com>
<433BDC0B.2040009@ev.net>
<89cc056d05092906521f72f367@mail.gmail.com>
On Thu, 29 Sep 2005, Alfredo Rico wrote:
> Your suggest is very correct and in fact it works very well but only if the
> file size is under 10 MB,
> The problem happens just at moment to execute:
> InputStream ins = rs.getBinaryStream( 1 );
>
The JDBC driver can stream data going to the server (setBinaryStream), but
cannot stream data returning from the server (getBinaryStream) because of
protocol limitations. You have two options:
Switch from using bytea to large objects (Blobs). Large objects were
designed to work with much larger data sizes and have a complete streaming
interface.
Increase the JVM's heap size. Since you are using netbeans and you
haven't received many helpful suggestions here, you might try a netbeans
specific list for suggestions on how to accomplish this.
Kris Jurka
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: books@ejurka.com, alfredorico@gmail.com, rfrancis@ev.net
Subject: Re: How to retieve binary data (bytea) without problem ?
In-Reply-To: <Pine.BSO.4.61.0509291201150.25137@leary.csoft.net>
References: <89cc056d050928132714e17730@mail.gmail.com> <433BDC0B.2040009@ev.net> <89cc056d05092906521f72f367@mail.gmail.com> <Pine.BSO.4.61.0509291201150.25137@leary.csoft.net>
* 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