Re: SET autocommit begins transaction?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Sean Chittenden <sean(at)chittenden(dot)org>, Thomas Lockhart <lockhart(at)fourpalms(dot)org>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: SET autocommit begins transaction?
Date: 2002-09-18 23:48:25
Message-ID: 20020918164355.G20780-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 18 Sep 2002, Bruce Momjian wrote:

> Sean Chittenden wrote:
> > > But it seems so illogical that SET doesn't start a transaction, but
> > > if it is in a transaction, it is rolled back, and this doesn't help
> > > our statement_timeout example except to require that they do BEGIN
> > > to start the transaction even when autocommit is off.
> >
> > Really? To me that makes perfect sense. Logic:
> >
> > *) Only BEGIN starts a transaction
>
> I think the above item is the issue. Everything is clear with
> autocommit on. With autocommit off, COMMIT/ROLLBACK starts a
> transaction, not BEGIN. BEGIN _can_ start a transaction, but it isn't
> required:

AFAICT, according to spec, commit/rollback does not start a transaction,
the transcation is started with the first transaction initiating statement
when there isn't a current transaction. And, most of the SQL92 commands
that start with SET fall into the category of commands that do not
initiate transactions.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2002-09-18 23:55:19 Re: SET autocommit begins transaction?
Previous Message Bruce Momjian 2002-09-18 23:40:45 Re: SET autocommit begins transaction?