Re: SET autocommit begins transaction?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: SET autocommit begins transaction?
Дата
Msg-id 200209182326.g8INQbj09369@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: SET autocommit begins transaction?  (Sean Chittenden <sean@chittenden.org>)
Ответы Re: SET autocommit begins transaction?  (Sean Chittenden <sean@chittenden.org>)
Список 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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Sean Chittenden
Дата:
Сообщение: Re: SET autocommit begins transaction?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: SET autocommit begins transaction?