Re: Nested Transactions, Abort All - Mailing list pgsql-hackers

From Dennis Bjorklund
Subject Re: Nested Transactions, Abort All
Date
Msg-id Pine.LNX.4.44.0407110729500.2838-100000@zigo.dhs.org
Whole thread Raw
In response to Re: Nested Transactions, Abort All  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Sat, 10 Jul 2004, Bruce Momjian wrote:

> Oracle can use SAVEPOINTS all the time because it knows it is always in
> a transaction, but PostgreSQL is not always.

PostgreSQL is also alsways in a transaction. If some use autocommit and go
 SAVEPOINT foo;
 RELEASE foo;

The first will work and that transaction will end. Then the next is in a
new transaction and will fail with an error saying that foo does not
exist. That's how it should be.

If people don't like or understand autocommit they should not use it.  
This is especially true in other cases where people do updates that really
must be in a single transaction.

Your idea is that if we use nested BEGIN/COMMIT one can always issue these
even if one does not know if one have done BEGIN before or not. To me this
is a problem with autocommit that is solved by not using autocommit. I 
don't think this is a problem we should solve.

-- 
/Dennis Björklund



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: plperl (7.5)
Next
From: Jan Wieck
Date:
Subject: Re: [BUGS] BUG #1118: Misleading Commit message