Re: Rollback locks table - why? - Mailing list pgsql-sql

From Jan Peters
Subject Re: Rollback locks table - why?
Date
Msg-id 20080320143005.95720@gmx.net
Whole thread Raw
In response to Re: Rollback locks table - why?  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-sql
Hello Craig,

> Jan Peters wrote:
> > If I run the transaction block from above again I get first a unique key
> violation (that is ok, because that's what I trying to check for) but
> there is NO rollback to sp1, only the "Unique Key" error message and after that
> I get the dreaded "current transaction is aborted" error message and the
> system reports an EXCLUSIVE LOCK on the table (<IDLE>in transaction).
> >   
> Am I correct in saying that your issue is really that you want an error
> to trigger an automatic rollback to the last savepoint, but it does not
> do so ?
>
> If you issue the ROLLBACK manually (after you get the constraint error
> or a "current transaction is aborted" message) does it work as you would
> expect?

Yes, you are correct: I just want to issue an insertion of a row at the very beginning of an application start. So,
whenthe table "test" is empty,  the row with "runde = 0"  should be inserted. If this row is already present, it should
beupdated.
 

How do I do a "manual" ROLLBACK?

Regards and thank you again in advance

Jan
-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx


pgsql-sql by date:

Previous
From: Joe
Date:
Subject: Re: Select into
Next
From: "Gurjeet Singh"
Date:
Subject: Re: Select into