From: Oliver Jowett <oliver@opencloud.com>
To: ecf@goldencode.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Implicit autocommit?
Date: Sun, 15 Jul 2007 23:07:34 +1200
Message-ID: <4699FFF6.4050506@opencloud.com> (raw)
In-Reply-To: <4699BA51.6050001@goldencode.com>
References: <4699BA51.6050001@goldencode.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, ecf@goldencode.com
Subject: Re: Implicit autocommit?
In-Reply-To: <4699FFF6.4050506@opencloud.com>
References: <4699BA51.6050001@goldencode.com> <4699FFF6.4050506@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox