Re: JDBC driver inserting into a table with Bytea type get

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: JDBC driver inserting into a table with Bytea type get
Дата
Msg-id Pine.BSO.4.56.0406211610170.9082@leary.csoft.net
обсуждение исходный текст
Ответ на Re: JDBC driver inserting into a table with Bytea type get  ("Sailer, Denis (YBUSA-CDR)" <Denis.Sailer@Yellowbook.com>)
Список pgsql-jdbc

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=4085F25A.8060009%40opencloud.com

> 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


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

Предыдущее
От: "Sailer, Denis (YBUSA-CDR)"
Дата:
Сообщение: Re: JDBC driver inserting into a table with Bytea type get
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: JDBC driver inserting into a table with Bytea type get