Re: why postgresql over other RDBMS

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: why postgresql over other RDBMS
Date: 2007-05-25 19:47:32
Message-ID: 20070525194732.GR32392@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)crankycanuck(dot)ca
"The year's penultimate month" is not in truth a good way of saying
November.
--H.W. Fowler

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2007-05-25 20:01:02 Re: Vacuum DB in Postgres Vs similar concept in other RDBMS
Previous Message Tom Lane 2007-05-25 19:40:14 Re: swap storm created by 8.2.3