From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | hans wulf <lotu1(at)gmx(dot)net> |
Cc: | pgsql-jdbc(at)postgresql(dot)org, Sean Bowman <pico303(at)gmail(dot)com> |
Subject: | Re: PreparedStatement batch statement impossible |
Date: | 2011-04-02 08:46:18 |
Message-ID: | alpine.BSO.2.00.1104020434160.1216@leary.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Radosław Smogura | 2011-04-03 20:40:41 | Re: JDBC4 Binary Mode with Arrays |
Previous Message | Kris Jurka | 2011-04-02 06:43:06 | Re: JDBC4 Binary Mode with Arrays |