From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
---|---|
To: | Ralf Wiebicke <ralf(dot)wiebicke(at)exedio(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: in failed sql transaction |
Date: | 2006-09-25 14:36:25 |
Message-ID: | 1159194986.4033.2.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Brandon Aiken | 2006-09-25 14:47:11 | Re: serial column |
Previous Message | Ben Trewern | 2006-09-25 14:04:04 | Re: What is the Best Postgresql Load Balancing Solution available ? |