Re: in failed sql transaction

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: in failed sql transaction
Дата
Msg-id 1159220016.26848.42.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Re: in failed sql transaction  (Ralf Wiebicke <ralf.wiebicke@exedio.com>)
Список 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 по дате отправления:

Предыдущее
От: "Harry Hehl"
Дата:
Сообщение: Re: Timestamp with timezone query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Restart after poweroutage