Re: Vote totals for SET in aborted transaction - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Vote totals for SET in aborted transaction
Date
Msg-id 1020097630.27493.15.camel@taru.tm.ee
Whole thread Raw
In response to Re: Vote totals for SET in aborted transaction  (Scott Marlowe <scott.marlowe@ihs.com>)
Responses Re: Vote totals for SET in aborted transaction  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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.
> I would argue that the rollback on failure / don't rollback on completion 
> is actually the worse possible way to handle this, because, again, this 
> isn't about data, it's about environment.  And I don't think things inside 
> a transaction should be mucking with the environment around them when 
> they're done.

That would assume nested transactions which we don't have yet.
---------------
Hannu



pgsql-hackers by date:

Previous
From: Olivier PRENANT
Date:
Subject: clarification of timestamp
Next
From: Thomas Lockhart
Date:
Subject: Re: Vote totals for SET in aborted transaction