On 23 February 2016 at 21:34, Robert Haas <robertmh...@gmail.com> wrote:
> On Sat, Feb 20, 2016 at 4:14 PM, Craig Ringer <cr...@2ndquadrant.com>
> >> currently PostgreSQL::"set autocommit to FALSE ( not supported )
> > This also does not make any sense.
> > PgJDBC does support turning autocommit off. So I don't know in what way
> > "not supported".
> I believe Sridhar is imagining that someday "set autocommit to false"
> might be a command that the server would understand.
... I guess. Yeah.
Oracle's SQL*Plus has the concept of turning autocommit off, but I suspect
that's client-side behaviour.
I can't really imagine how it'd make sense on the server side, given how
the protocol works etc. Nor is it necessary since the desired behaviour is
entirely controlled on the client side.
We could have a server mode that did silent, automatic savepoints and
rolled back to a savepoint automatically on ERROR. That wouldn't be the
same as autocommit, but appears to be what Sridhar actually needs. There's
even the remotest chance someone could come up with a patch that might be
acceptable, but I don't know of anyone who'd want to do it when it can be
done well enough client side.
I think Sridhar is confusing autocommit with other DBMSes behaviour of
automatically rolling back failed statements without affecting the rest of
the transaction. These are not the same thing.
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services