Re: Nested xacts: looking for testers and review - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Nested xacts: looking for testers and review
Date
Msg-id 20040610200513.GA4744@dcc.uchile.cl
Whole thread Raw
In response to Re: Nested xacts: looking for testers and review  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Nested xacts: looking for testers and review
List pgsql-hackers
On Thu, Jun 10, 2004 at 03:39:14PM -0400, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > We are considering allowing COMMIT IGNORE ABORT for scripts that want to
> > do a subtransaction, but don't care if it fails, and because it is a
> > script, they can't test the return value to send ROLLBACK:
> 
> While we clearly want this functionality, I tend to agree with Barry
> that COMMIT IGNORE ABORT (and the other variants that have been floated)
> is a horrid, confusing name for it.  I would suggest using END with some
> modifier, instead.  Perhaps
> 
>     END [ WORK | TRANSACTION ] [ IGNORE ERRORS ]
> 
> END doesn't so directly imply that you are trying to commit a failed
> transaction.

The problem with END is how about executing it inside a PL/pgSQL
function.  Can we distinguish it from plpgsql's END?

Also, COMMITing an aborted main transaction is the same as ENDing it;
and in fact, it's the same as ROLLBACK.  Why is it more confusing for a
subtransaction to behave the same?

I agree that the grammar I proposed is wrong.  I guess I can ask for two
words and then strcmp() them to "ignore errors"?

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La naturaleza, tan frágil, tan expuesta a la muerte... y tan viva"



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Nested xacts: looking for testers and review
Next
From: Manfred Koizar
Date:
Subject: More vacuum.c refactoring