pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: bubba postgres <bubba.postgres@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: JDBC4 Binary Mode with Arrays
Date: Fri, 1 Apr 2011 11:44:32 -0700
Message-ID: <BANLkTikvzvn4TFWScamdo6Ps30ef2TTmYA@mail.gmail.com> (raw)

Sorry for the cross post, I put this on general first:

In my current application I am sending a lot of data to/from the DB with
JDBC, and specifically arrays of Double. (or even Double[][]).
I have been converting everything into a string representation of the array
with StringBuffer, which eats a lot of memory.

I note that there is this web page:
http://wiki.postgresql.org/wiki/JDBC-BinaryTransfer

Which made me think I might be saved.

After trying out the JDBC4 driver in DBCP, I see that
Connection.createArray(...) still just creates a big string under the
covers. Is that the expected behavior? Am I doing it wrong?
Will the String get converted to binary representation again before hitting
the wire?

Regards,
-JD

view thread (3+ messages)  latest in thread

Message-ID: <BANLkTikvzvn4TFWScamdo6Ps30ef2TTmYA@mail.gmail.com>
Permalink:  ../BANLkTikvzvn4TFWScamdo6Ps30ef2TTmYA@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTikvzvn4TFWScamdo6Ps30ef2TTmYA@mail.gmail.com

 · 

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: bubba.postgres@gmail.com
  Subject: Re: JDBC4 Binary Mode with Arrays
  In-Reply-To: <BANLkTikvzvn4TFWScamdo6Ps30ef2TTmYA@mail.gmail.com>
  References: <BANLkTikvzvn4TFWScamdo6Ps30ef2TTmYA@mail.gmail.com>

* 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