Re: JDBC behaviour

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC behaviour
Date: 2016-02-20 11:13:46
Message-ID: CAMsr+YF6nj0Qh+A0J3hJrQD1ofwq_=k_tXUewb0EQO_0uj7Azg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-jdbc

On 20 February 2016 at 19:05, John R Pierce <pierce(at)hogranch(dot)com> wrote:

>
> to me this seems to break the rules of transaction semantics, but it
> matches the behavior with autocommit=on ...
>
>
... which doesn't matter, because if you wanted that you'd just set
autocommit=on.

I think all this discussion of autocommit is a pointless side-track.
Reading between the lines, the real complaint appears to be that we abort
the xact if a statement ERRORs, and by default other DBMS vendors don't. OP
wants something like psqlODBC's "statement" error-rollback mode where
savepoints are done automatically before each statement.

Of course they're contending that PgJDBC's behaviour is wrong because it
doesn't do exactly what they expect, with no reference to the specs and
standards concerned, which doesn't help. They're also using a bunch of
incomplete pseudocode and vague references to make the argument, which
means it's all really rather hard to follow. But I'm pretty sure the above
is what they actually mean, like in
https://github.com/pgjdbc/pgjdbc/issues/423 .

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2016-02-20 13:14:36 Re: JDBC behaviour
Previous Message John R Pierce 2016-02-20 11:05:35 Re: JDBC behaviour

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-02-20 11:44:20 Re: Spurious standby query cancellations
Previous Message John R Pierce 2016-02-20 11:05:35 Re: JDBC behaviour

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Kellerer 2016-02-20 13:14:36 Re: JDBC behaviour
Previous Message John R Pierce 2016-02-20 11:05:35 Re: JDBC behaviour