Skip site navigation (1) Skip section navigation (2)

Re: Using bytea with ResultSet.getBytes("..."). Problem. Help!!

From: Kris Jurka <books(at)ejurka(dot)com>
To: roman <xroot(at)mail(dot)ru>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Using bytea with ResultSet.getBytes("..."). Problem. Help!!
Date: 2007-07-19 12:34:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

On Thu, 19 Jul 2007, roman wrote:

> I have a problem with reading big binary data from BYTEA field. I write 
> to it about 16MB pdf file (as byte[] array) sucessfully, but when I try 
> to read it back I have an exception:
> Exception occurred during event dispatching:
> java.lang.OutOfMemoryError: Java heap space
>        at org.postgresql.util.PGbytea.toBytes(

You don't mention what driver version you are using, but 8.2-504 and 
higher will be slightly stingier about the amount of memory it uses.  You 
still need a lot of memory to retrieve large results, but this version is 

Kris Jurka

In response to

pgsql-jdbc by date

Next:From: Mikko TiihonenDate: 2007-07-20 19:14:06
Subject: [PATCH] Stop test cases from leaking connections
Previous:From: Mikko TiihonenDate: 2007-07-19 12:27:08
Subject: Re: Status of binary protocol usage?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group