Re: in failed sql transaction

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: in failed sql transaction
Дата
Msg-id 1159194986.4033.2.camel@localhost.localdomain
обсуждение исходный текст
Ответ на in failed sql transaction  (Ralf Wiebicke <ralf.wiebicke@exedio.com>)
Список pgsql-general
On Sun, 2006-09-24 at 12:03 +0200, Ralf Wiebicke wrote:
> Hi all!
>
> I just realized the following behaviour in postgresql: when I violate any
> constraint (unique constraint in my case) then the transaction is not usable
> anymore. Any other sql command returns a "in failed sql transaction" error.
> All other databases I used up to now just ignore the statement violating the
> constraint, but leave the transaction intact.
>
> Is this intended behaviour or rather a bug? Or is there any way to "switch on"
> the behaviour I'd like to see?

Normal behaviour.

Have you read up on savepoints?

http://www.postgresql.org/docs/8.1/interactive/sql-savepoint.html

It allows you to set a point to rollback to should an error occur.

В списке pgsql-general по дате отправления:

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: copy db1 to db2
Следующее
От: "Brandon Aiken"
Дата:
Сообщение: Re: serial column