Re: PreparedStatement batch statement impossible

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: PreparedStatement batch statement impossible
Дата
Msg-id alpine.BSO.2.00.1104020434160.1216@leary.csoft.net
обсуждение исходный текст
Ответ на PreparedStatement batch statement impossible  ("hans wulf" <lotu1@gmx.net>)
Список pgsql-jdbc

On Wed, 2 Mar 2011, hans wulf wrote:

> when using addBatch() and executeBatch() it is impossible to get the
> generated keys. addBatch() fails with an BatchUpdateException because it
> isn't expecting results. I am using postgres 9.0 and the newest 9.0_801
> JDBC-Thingy.
>

I have implemented returning generated keys for batch execution.
Unfortunately, it does have to make a performance compromise to be able to
support returning values.  Since the returned values may be potentially
large, we can't batch up multiple statements for sending to the server
because of the deadlock risk.

Test jar available here:

http://www.ejurka.com/pgsql/jars/batchgenkey/

Kris Jurka

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: JDBC4 Binary Mode with Arrays
Следующее
От: Radosław Smogura
Дата:
Сообщение: Re: JDBC4 Binary Mode with Arrays