Re: Vote totals for SET in aborted transaction

Поиск
Список
Период
Сортировка
От Marc G. Fournier
Тема Re: Vote totals for SET in aborted transaction
Дата
Msg-id 20020429133319.G15173-100000@mail1.hub.org
обсуждение исходный текст
Ответ на Re: Vote totals for SET in aborted transaction  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Vote totals for SET in aborted transaction  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
On Mon, 29 Apr 2002, Bruce Momjian wrote:

> Hannu Krosing wrote:
> > On Mon, 2002-04-29 at 17:09, Scott Marlowe wrote:
> > > For this reason, I propose that a transaction should "inherit" its
> > > environment, and that all changes EXCEPT for those affecting tuples should
> > > be rolled back after completion, leaving the environment the way we found
> > > it.  If you need the environment changed, do it OUTSIDE the transaction.
> >
> > Unfortunately there is no such time in postgresql where commands are
> > done outside transaction.
> >
> > If you don't issue BEGIN; then each command is implicitly run in its own
> > transaction.
> >
> > Rolling each command back unless it is in implicit transaction would
> > really confuse the user.
>
> Agreed, very non-intuitive.  And can you imagine how many applications
> we would break.

Since there is obviously no defined standard for how a SET should be
treated within a transaction ... who cares?  God, how many changes have we
made in the past that "break applications" but did them anyway?

Just as a stupid question here ... but, why do we wrap single queries into
a transaction anyway?  IMHO, a transaction is meant to tell the backend to
remember this sequence of events, so that if it fails, you can roll it
back ... with a single INSERT/UPDATE/DELETE, why 'auto-wrapper' it with a
BEGIN/END?



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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Vote totals for SET in aborted transaction
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Vote totals for SET in aborted transaction