Re: in failed sql transaction - Mailing list pgsql-general

From Scott Marlowe
Subject Re: in failed sql transaction
Date
Msg-id 1159220016.26848.42.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: in failed sql transaction  (Ralf Wiebicke <ralf.wiebicke@exedio.com>)
List pgsql-general
On Mon, 2006-09-25 at 16:20, Ralf Wiebicke wrote:
> Hi!
>
> Thanks for all the help.
>
> I finally used savepoints to get what I want.
>
> However I don't like this very much. I tried a few other databases (hsqldb,
> mysql/innodb and oracle), and none of them made the transaction unusable
> after violating the constraint.

I wouldn't hold MySQL as the standard of "the right way of doing
things."  But I do take your point.

Having grown up with PostgreSQL, I much prefer the all or nothing
approach with explicit save pointing to make you do it right.

It's especially nice when you're trying to to an import.  With oracle,
you HAVE to have sqlldr to get things done.  With pgsql, you can just
try an import, and if one row is bad, the whole thing aborts, no half
finished import without knowing what did or didn't go in.

There's the right way, and the easy way, and sadly, seldom are they the
same.

pgsql-general by date:

Previous
From: "Harry Hehl"
Date:
Subject: Re: Timestamp with timezone query
Next
From: Tom Lane
Date:
Subject: Re: Restart after poweroutage