Re: 25P02, current transaction is aborted, commands ignored

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "sangeetha *EXTERN*" <sangeetha(at)gbsoft(dot)in>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: 25P02, current transaction is aborted, commands ignored
Date: 2008-05-14 07:28:19
Message-ID: D960CB61B694CF459DCFB4B0128514C202181F7F@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

sangeetha wrote:
> Actually i am trying to insert some values within a transaction. I am
> also carrying out some data select operations after opening the
> transaction. But i am getting the above mentioned error. But i want the
> insert to happen. Please reply back to me as early as possible. i would
> be very thankful to you guys. I am sending through mail because i am
> unable to post my issue.

One of the statements within you transaction caused an error.
Every following statement in the transaction will raise the error
message you get until you ROLLBACK the whole transaction.

To preempt the question what you can do if you do not want to rollback
the whole transaction because of an error, I recommend the use of
savepoints:
http://www.postgresql.org/docs/current/static/sql-savepoint.html

Just set one before every statement that might cause an error,
and ROLLBACK TO SAVEPOINT if you get one.

Yours,
Laurenz Albe

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Daniel Migowski 2008-05-14 14:44:59 Testing JDBC Prepared Statements
Previous Message Dave Cramer 2008-05-13 17:54:36 Re: 25P02, current transaction is aborted, commands ignored