JDBC4 Binary Mode with Arrays

Поиск
Список
Период
Сортировка
От bubba postgres
Тема JDBC4 Binary Mode with Arrays
Дата
Msg-id BANLkTikvzvn4TFWScamdo6Ps30ef2TTmYA@mail.gmail.com
обсуждение исходный текст
Ответы Re: JDBC4 Binary Mode with Arrays  (Kris Jurka <books@ejurka.com>)
Re: JDBC4 Binary Mode with Arrays  (Radosław Smogura <rsmogura@softperience.eu>)
Список pgsql-jdbc
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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Maciek Sakrejda
Дата:
Сообщение: Re: JDK1.7 support
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: JDBC4 Binary Mode with Arrays