X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 44C5FD6F5D for ; Thu, 29 Sep 2005 15:37:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 14198-10 for ; Thu, 29 Sep 2005 18:37:39 +0000 (GMT) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.194]) by svr1.postgresql.org (Postfix) with ESMTP id 800ECD9C88 for ; Thu, 29 Sep 2005 15:37:39 -0300 (ADT) Received: by xproxy.gmail.com with SMTP id s14so1711029wxc for ; Thu, 29 Sep 2005 11:37:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=k98iSW64pWojPBMXGf0svhL/t0kSqCMYi86FrpfY6rgV7mLNSufHR/zaVSXS783gj3ZIXyeOXEcQ7HmOhIuI5/tT4QMbacOAopv+ahufPxKbXeGm8ObiUmkquoCnBy3d8fgR1RbWxed5Wtqy/Et6O+RoGK2cSo0ZQ0jv0k50iBw= Received: by 10.70.39.14 with SMTP id m14mr609651wxm; Thu, 29 Sep 2005 11:37:40 -0700 (PDT) Received: by 10.70.41.14 with HTTP; Thu, 29 Sep 2005 11:37:40 -0700 (PDT) Message-ID: <89cc056d05092911376050d6bc@mail.gmail.com> Date: Thu, 29 Sep 2005 14:37:40 -0400 From: Alfredo Rico Reply-To: Alfredo Rico To: Kris Jurka Subject: Re: How to retieve binary data (bytea) without problem ? Cc: Russell Francis , pgsql-jdbc@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5343_599115.1128019060716" References: <89cc056d050928132714e17730@mail.gmail.com> <433BDC0B.2040009@ev.net> <89cc056d05092906521f72f367@mail.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.775 required=5 tests=[AWL=-0.586, HTML_20_30=0.504, HTML_MESSAGE=0.001, RCVD_BY_IP=0.024, RCVD_IN_BL_SPAMCOP_NET=1.832] X-Spam-Level: * X-Archive-Number: 200509/133 X-Sequence-Number: 13918 ------=_Part_5343_599115.1128019060716 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thank you Kris, I was absolutely confused about this situation. I'll switch to Blob objects because increasing the JVM heap could harm perfromance... Kind Regards. Alfredo Rico, On 9/29/05, Kris Jurka wrote: > > > > 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 =3D rs.getBinaryStream( 1 ); > > > > The JDBC driver can stream data going to the server (setBinaryStream), bu= t > 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 streamin= g > 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 > ------=_Part_5343_599115.1128019060716 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thank you Kris, I was absolutely confused about this situation.

I'll switch to Blob objects because increasing the JVM heap could harm perf= romance...

Kind Regards.
Alfredo Rico,

On 9/29/05, Kris Jurka <books@ejurka.com> wrote:


On Thu, 29 Sep 2005, Alfredo Rico wrote:

> Your suggest i= s 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 =3D rs.getBinaryStream( 1 );
>

The JD= BC driver can stream data going to the server (setBinaryStream), but
can= not stream data returning from the server (getBinaryStream) because of
protocol limitations.  You have two options:

Switch from u= sing bytea to large objects (Blobs).  Large objects were
desig= ned to work with much larger data sizes and have a complete streaming
in= terface.

Increase the JVM's heap size.  Since you are using netbeans and y= ou
haven't received many helpful suggestions here, you might try a netbe= ans
specific list for suggestions on how to accomplish this.

Kris= Jurka

------=_Part_5343_599115.1128019060716--