Skip site navigation (1) Skip section navigation (2)

current transaction is aborted, commands ignored until end of transaction block

From: "Vang" <vyang(at)apt-cafm(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: current transaction is aborted, commands ignored until end of transaction block
Date: 2007-05-29 21:04:02
Message-ID: 000601c7a234$e2fab9f0$6900a8c0@yang (view raw or flat)
Thread:
Lists: pgsql-general
Hello,

I'm using PostgreSQL 8.0 and Java in NetBeans IDE.  In java I have a method that does a "insert into" and it throws a "duplicate key violates unique constraint."  I call that method once and then call another method which does a "select."  However, when the select method gets called postgres throws a "current transaction is aborted, commands ignored until end of transaction block."  I've read some of the mailing list and it says if I set on_error_rollback to on it'll work; but when I use sql(from netbeans) to set it, it doesn't recognize on_error_rollback.  My statement is as follows:
    set on_error_rollback = on

Does version 8.0 not have on_error_rollback?  Is there another way of handling this.  Any help is much appreciated.


vyang

Responses

pgsql-general by date

Next:From: Magnus HaganderDate: 2007-05-29 21:25:30
Subject: Re: [Re] Re: Winsock error 10035 while trying to upgrade from 8.0 to 8.2
Previous:From: Richard Broersma JrDate: 2007-05-29 20:35:06
Subject: Re: problems with SELECT query results

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group