Re: why postgresql over other RDBMS

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: why postgresql over other RDBMS
Дата
Msg-id 20070525194732.GR32392@phlogiston.dyndns.org
обсуждение исходный текст
Ответ на Re: why postgresql over other RDBMS  (Ron Johnson <ron.l.johnson@cox.net>)
Список pgsql-general
On Fri, May 25, 2007 at 01:26:02PM -0500, Ron Johnson wrote:
> >> 1. transaction failure on statement failure[0], and
> >
> > I personally regard that as a feature, not a bug, so I'd be opposed
> > to changing it.
>
> Why?  Not failing the whole transaction lets me decide how to handle
> that *one* statement error, without have to code for retrying the
> whole transaction.

Because it's entailed by the definition of atomicity.  Codd put it
this way: "Such a block constitutes a transaction if, during its
execution, either all parts succeed or none succeeds."  If you want
to get around this, you can put a subtransaction around every
statement.

You say you don't want to do the latter, but there's no reason your
client couldn't do it for you, in much the same way we have
AUTOCOMMIT modes.  Indeed, PL/pgSQL actually does this sort of trick
in order to get exception handling.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
"The year's penultimate month" is not in truth a good way of saying
November.
        --H.W. Fowler

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: swap storm created by 8.2.3
Следующее
От: Robert Fitzpatrick
Дата:
Сообщение: Re: Referencing any field in a trigger