Re: getBinaryStream and OutOfMemoryException

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Jesper Thorhauge <jth(at)conzentrate(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: getBinaryStream and OutOfMemoryException
Date: 2005-06-28 13:06:13
Message-ID: 42C14B45.8000500@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Jesper Thorhauge wrote:
> Looking into the cvs
> checkout from
> 22-05-2005, it really seems to me that getBinaryStream is nothing more
> than a
> getBytes ...??

Correct. The current frontend/backend protocol doesn't really let us do
this differently, at least for bytea columns. It could be made more
memory-efficient (e.g. by using the binary result format rather than the
current text format) but the driver still has to pull the entire column
value across the wire at the time the row is returned.

Another approach would be to write large column values to disk, but
noone's written the code to do that yet; it also has some other problems
such as: what if you are running in an environment where you don't have
access to the disk?

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jesper Thorhauge 2005-06-28 13:13:14 Re: getBinaryStream and OutOfMemoryException
Previous Message Jesper Thorhauge 2005-06-28 08:15:31 getBinaryStream and OutOfMemoryException