View Single Post

   
  #4 (permalink)  
Old 05-16-2008, 01:43 PM
Albe Laurenz
 
Posts: n/a
Default Re: 25P02, current transaction is aborted, commands ignored

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/curre...savepoint.html

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

Yours,
Laurenz Albe

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

Reply With Quote