Re: Implicit autocommit? - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Implicit autocommit?
Date
Msg-id 4699FFF6.4050506@opencloud.com
Whole thread Raw
In response to Implicit autocommit?  (Eric Faulhaber <ecf@goldencode.com>)
Responses Re: Implicit autocommit?  (Eric Faulhaber <ecf@goldencode.com>)
List pgsql-jdbc
Eric Faulhaber wrote:

> I debugged into the driver and found it was issuing a "BEGIN" to the
> backend just before each statement.  Why would it do this with
> autocommit disabled?

autocommit on = implicit transaction wrapping each individual statement.
In the postgres world, this means "don't use BEGIN/COMMIT at all".

autocommit off = explicit transaction demarcation, the first statement
executed starts a new transaction that lasts until rollback()/commit()
are called. In the postgres world, this means "use BEGIN/ROLLBACK/COMMIT
to demarcate the transaction". So the driver issues a BEGIN to start a
new transaction as necessary.

-O

pgsql-jdbc by date:

Previous
From: Eric Faulhaber
Date:
Subject: Implicit autocommit?
Next
From: Marek Lewczuk
Date:
Subject: Re: patch - support for multi-dimensional arrays and NULL values