Re: JDBC behaviour

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Mark Rotteveel <mark(at)lawinegevaar(dot)nl>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC behaviour
Date: 2016-02-18 12:15:11
Message-ID: CADK3HHKf+mwzr+N8gPj1-CNi2ohyVcf3fuNgtpBHpEOeUnFB6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

On 18 February 2016 at 07:09, Mark Rotteveel <mark(at)lawinegevaar(dot)nl> wrote:

> On Thu, 18 Feb 2016 11:59:50 +0100 (CET), Andreas Joseph Krogh
> <andreas(at)visena(dot)com> wrote:
> > På torsdag 18. februar 2016 kl. 11:43:36, skrev Sridhar N Bamandlapally
> <
> > sridhar(dot)bn1(at)gmail(dot)com <mailto:sridhar(dot)bn1(at)gmail(dot)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.
>

This behaviour is an artifact of PostgreSQL. If you want to change the
transaction semantics of PostgreSQL then pgsql-hackers is the place to take
this up.

JDBC is just an interface. We aren't going to rewrite the backend semantics
to meet everyones needs/wants.

Dave Cramer

davec(at)postgresintl(dot)com
www.postgresintl.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mark Rotteveel 2016-02-18 12:22:15 Re: JDBC behaviour
Previous Message Vitaly Burovoy 2016-02-18 12:11:57 Re: Query plan not updated after dropped index

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Rotteveel 2016-02-18 12:22:15 Re: JDBC behaviour
Previous Message Mark Rotteveel 2016-02-18 12:09:18 Re: JDBC behaviour

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mark Rotteveel 2016-02-18 12:22:15 Re: JDBC behaviour
Previous Message Mark Rotteveel 2016-02-18 12:09:18 Re: JDBC behaviour