From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Sean Chittenden <sean(at)chittenden(dot)org> |
Cc: | Thomas Lockhart <lockhart(at)fourpalms(dot)org>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: SET autocommit begins transaction? |
Date: | 2002-09-18 23:26:37 |
Message-ID: | 200209182326.g8INQbj09369@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Sean Chittenden wrote:
> > I am fine with special casing autocommit. Is that what you are
> > suggesting?
>
> I think he means:
>
> Ex:
> SET autocommit TO off;
> SHOW autocommit;
> ROLLBACK;
> # warning about being outside of a transaction
> BEGIN;
> SET autocommit TO on;
> SHOW autocommit; # shows on
> ROLLBACK;
> SHOW autocommit; # shows off
>
> Only have the SET's in a transaction/rollback-able if they're made
> inside of a transaction, otherwise leave them as atomic changes. -sc
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.
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-09-18 23:29:34 | Re: SET autocommit begins transaction? |
Previous Message | Sean Chittenden | 2002-09-18 23:22:11 | Re: SET autocommit begins transaction? |