Re: Implicit autocommit?

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: ecf(at)goldencode(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Implicit autocommit?
Date: 2007-07-15 11:07:34
Message-ID: 4699FFF6.4050506@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Marek Lewczuk 2007-07-15 11:42:47 Re: patch - support for multi-dimensional arrays and NULL values
Previous Message Eric Faulhaber 2007-07-15 06:10:25 Implicit autocommit?