Discussion:
Confuse about the behaveior of PreparedStatement.executeBatch (jdbc)
(too old to reply)
Haifeng Liu
2012-12-13 10:44:56 UTC
Permalink
Hi,

I have a DB writer program written in Java, it do batch updates, and will try to update each record in a batch if it failed. I think no any record in a batch will be update if the batch failed, but weirdly I found a few records update twice(very little amount among all records).

Well, there is less stuff about postgresql jdbc driver. I wanna know if executeBatch really keep all the records in a batch untouched when the batch failed. Any help is appreciate.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kevin Grittner
2012-12-13 16:06:07 UTC
Permalink
Post by Haifeng Liu
I wanna know if executeBatch really keep all the records in a
batch untouched when the batch failed.
I recommend asking on the pgsql-jdbc list. You might want to
mention what autoCommit is set to during the attempt.

-Kevin
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...