Re: Nested xacts: looking for testers and review

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Nested xacts: looking for testers and review
Дата
Msg-id 20040610200513.GA4744@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Nested xacts: looking for testers and review  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Nested xacts: looking for testers and review  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Nested xacts: looking for testers and review
Следующее
От: Manfred Koizar
Дата:
Сообщение: More vacuum.c refactoring