Re: JDBC behaviour - Mailing list pgsql-jdbc

From Mark Rotteveel
Subject Re: JDBC behaviour
Date
Msg-id d36d46129dd36118a94f77370fd52cbf@imap.procolix.com
Whole thread Raw
In response to Re: JDBC behaviour  (Andreas Joseph Krogh <andreas@visena.com>)
Responses Re: JDBC behaviour  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
On Thu, 18 Feb 2016 11:59:50 +0100 (CET), Andreas Joseph Krogh
<andreas@visena.com> wrote:
> På torsdag 18. februar 2016 kl. 11:43:36, skrev Sridhar N Bamandlapally
<
> sridhar.bn1@gmail.com <mailto:sridhar.bn1@gmail.com>>:
> The code/framework is written to handle batch inserts, which is common
for
> all
> databases 
> I feel, PostgreSQL JDBC may need to modify setAutoCommit(false) code to
> "implicit savepoint - on error - rollback to savepoint"
>
>  
> You simply cannot have batch-inserts in the same transaction and
expecting
> the
> batch not to fail if one of the statements in the batch fails.

On a lot of other database systems, that is exactly how it works. If a
statement fails, that one statement is backed out (rolled back), and it is
still up to the user to decide if he wants to commit or rollback the
statements that did succeed.

Mark


pgsql-jdbc by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: JDBC behaviour
Next
From: Dave Cramer
Date:
Subject: Re: JDBC behaviour