Re: JDBC gripe list - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: JDBC gripe list
Date
Msg-id AANLkTin_Ju-qA3aNrTt42jgA_piaz4SDSBjcCC4pRYuB@mail.gmail.com
Whole thread Raw
In response to Re: JDBC gripe list  (Quartz <quartz12h@yahoo.com>)
List pgsql-jdbc
On Tue, Mar 29, 2011 at 3:29 PM, Quartz <quartz12h@yahoo.com> wrote:
> addBatch()/executeBatch() is broken under autocommit=true.
>
> Every statement is clearly supposed to be independant.
> Example: 5 insert statements, let's say the 2th and the 4th are on duplicate of primary key. All 3 others should
stillbe performed but they aren't. 
>
> This breaks our application. We migrated from mysql, and BOOM...
>

I would think the concept of execute batch would infer that they
should all commit or none should. This line from the API seems to
infer that

"Submits a batch of commands to the database for execution and if all
commands execute successfully, returns an array of update counts."

Where it states "if all commands execute successfully" implies a
transaction in the postgresql world.

Dave

>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

pgsql-jdbc by date:

Previous
From: Quartz
Date:
Subject: Re: JDBC gripe list
Next
From: Quartz
Date:
Subject: Re: JDBC gripe list