Re: JDBC4 Binary Mode with Arrays - Mailing list pgsql-jdbc

From Radosław Smogura
Subject Re: JDBC4 Binary Mode with Arrays
Date
Msg-id 201104032240.41399.rsmogura@softperience.eu
Whole thread Raw
In response to JDBC4 Binary Mode with Arrays  (bubba postgres <bubba.postgres@gmail.com>)
List pgsql-jdbc
bubba postgres <bubba.postgres@gmail.com> Friday 01 April 2011 20:44:32
> 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
I developed some experimental driver, with support for binary mode, and it's
only supported mode right now. I'll be glad if You try it:
http://softperience.eu/pages/cmn/ngpgjdbc.xhtml

Regards,
Radoslaw Smogura

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: PreparedStatement batch statement impossible
Next
From: Oliver Jowett
Date:
Subject: experimental Netty-based protocol implementation