pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Sailer, Denis (YBUSA-CDR) <Denis.Sailer@Yellowbook.com>
Cc: 'pgsql-jdbc@postgresql.org' <pgsql-jdbc@postgresql.org>
Subject: Re: JDBC driver inserting into a table with Bytea type get
Date: Mon, 21 Jun 2004 16:19:48 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0406211610170.9082@leary.csoft.net> (raw)
In-Reply-To: <58D6EF5727036048BC9E08ECB711A42092F472@crmsmail.corp.ybusa.net>
References: <58D6EF5727036048BC9E08ECB711A42092F472@crmsmail.corp.ybusa.net>



On Mon, 21 Jun 2004, Sailer, Denis (YBUSA-CDR) wrote:

> Yes, there is talk of a patch going into CVS, but there isn't anything that
> says "here it is".  Is there a patch in CVS and would someone post the
> procedure for getting it out?

It is not in cvs.  It is the first post in this long thread.  Specifically 
this one:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&safe=off&selm=4085F2...

> I don't see how this is a missing feature.  The documentation clearly states
> that bytea can hold up to 1GB of data.  Isn't it fair to assume that each
> interface that can be used to insert that data would work correctly?

This will work correctly if you have adequate memory settings for the JVM.  
In reality not many have that amount of memory handy.  For example calling
PreparedStatement.setBytes() with a 1GB byte array requires at least 1GB
of memory and there's no getting around that.  The driver then does some
escaping and so on which takes additional memory.  The goal of this patch
is to reduce this additional overhead, but there's no way (even with the
patch) that you can have a 1GB byte array with the default JVM settings.  
The patch allows setBinaryStream to directly stream binary data which 
should get rid of out of memory errors, but it's not as friendly an 
interface.

Kris Jurka




view thread (6+ messages)  latest in thread

Message-ID: <Pine.BSO.4.56.0406211610170.9082@leary.csoft.net>
Permalink:  ../Pine.BSO.4.56.0406211610170.9082@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.56.0406211610170.9082@leary.csoft.net

 · 

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: books@ejurka.com, Denis.Sailer@Yellowbook.com
  Subject: Re: JDBC driver inserting into a table with Bytea type get
  In-Reply-To: <Pine.BSO.4.56.0406211610170.9082@leary.csoft.net>
  References: <58D6EF5727036048BC9E08ECB711A42092F472@crmsmail.corp.ybusa.net> <Pine.BSO.4.56.0406211610170.9082@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