Re: Vote totals for SET in aborted transaction

From: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, Scott Marlowe <scott(dot)marlowe(at)ihs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vote totals for SET in aborted transaction
Date: 2002-04-29 16:38:44
Message-ID: 20020429133319.G15173-100000@mail1.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-04-29 16:41:17 Re: Vote totals for SET in aborted transaction
Previous Message Thomas Lockhart 2002-04-29 16:38:41 Re: clarification of timestamp