Re: JDBC behaviour

From: Mark Rotteveel <mark(at)lawinegevaar(dot)nl>
To: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC behaviour
Date: 2016-02-18 12:22:15
Message-ID: 22d3da56ff9f987ede3d18de6e49423e@imap.procolix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

On Thu, 18 Feb 2016 07:15:11 -0500, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
> 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:

>> > 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.

I understand that and indeed this isn't something that should be handled
by the driver, however some of the response in this thread seem to think it
is an absurd expectation from the OP that failure of one statement should
still allow a commit. Which it isn't if you look at what other database
systems do.

Mark

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Joseph Krogh 2016-02-18 12:48:04 Re: JDBC behaviour
Previous Message Dave Cramer 2016-02-18 12:15:11 Re: JDBC behaviour

Browse pgsql-hackers by date

  From Date Subject
Next Message Victor Wagner 2016-02-18 12:26:04 Re: Convert pltcl from strings to objects
Previous Message Dave Cramer 2016-02-18 12:15:11 Re: JDBC behaviour

Browse pgsql-jdbc by date

  From Date Subject
Next Message Andreas Joseph Krogh 2016-02-18 12:48:04 Re: JDBC behaviour
Previous Message Dave Cramer 2016-02-18 12:15:11 Re: JDBC behaviour