Re: 25P02, current transaction is aborted, commands ignored - Mailing list pgsql-jdbc

From Albe Laurenz
Subject Re: 25P02, current transaction is aborted, commands ignored
Date
Msg-id D960CB61B694CF459DCFB4B0128514C202181F7F@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Re: 25P02, current transaction is aborted, commands ignored  (sangeetha <sangeetha@gbsoft.in>)
List 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

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: 25P02, current transaction is aborted, commands ignored
Next
From: Daniel Migowski
Date:
Subject: Testing JDBC Prepared Statements