From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Sean Chittenden <sean(at)chittenden(dot)org> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: SET autocommit begins transaction? |
Date: | 2002-09-29 01:31:09 |
Message-ID: | 200209290131.g8T1V9P04122@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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.
>
> Was there any resolution to this or are SET's still starting a new
> transaction? I haven't seen any commits re: this, iirc. -sc
It is still an open item, but I think there was agreement that SET will
not start a transaction, and we will document that.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 959 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-09-29 02:16:54 | Re: SET autocommit begins transaction? |
Previous Message | Sean Chittenden | 2002-09-29 00:21:43 | Re: SET autocommit begins transaction? |