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  | [EMAIL PROTECTED]
"The year's penultimate month" is not in truth a good way of saying
November.
                --H.W. Fowler

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to