Re: in failed sql transaction

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Ralf Wiebicke <ralf(dot)wiebicke(at)exedio(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: in failed sql transaction
Date: 2006-09-25 21:33:36
Message-ID: 1159220016.26848.42.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-09-25 21:48:44 Re: Restart after poweroutage
Previous Message Ralf Wiebicke 2006-09-25 21:20:58 Re: in failed sql transaction