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

From: "Amaresh Wakkar" <babu_moshay(at)indiatimes(dot)com>
To: "Oliver Jowett"<oliver(at)opencloud(dot)com>, "Amaresh Wakkar"<babu_moshay(at)indiatimes(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: 25P02, current transaction is aborted, commands ignored
Date: 2006-04-02 15:03:07
Message-ID: 200604021424.TAA06182@WS0005.indiatimes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


"Oliver Jowett" wrote:

Amaresh Wakkar wrote:
&gt; Thanks!!
&gt;
&gt; The code works fine after I added savepoints around "Okay,even if
&gt; fails" statement.
&gt;
&gt; What is the idea behind taking this route(i.e all statements ignored
&gt; till end of block) though? Is there any archive thread discussing this?

There should be tons, it comes up regularly whenever someone ports an
app from Oracle..

&gt;&gt;&gt;&gt;Ok, Thanks!!

&gt; In this particular case, the autocommit is off and the statement has
&gt; failed so there is no risk of changes being made permanent(presumable PG
&gt; would rollback at database level the changed buffers etc.,) unless the
&gt; commit() method is invoked. Why then explicit rollback is needed? Is it
&gt; not best if it is left to programmer to handle this in exception
&gt; handling code?

There are arguments both ways. To some extent it depends on who you
trust more to get the code right: the DB developer (once) or the app
developer (once per query).
&gt;&gt;&gt;&gt;&gt; Once a statement fails, to continue further, savepoints need to be used so that postgreSQL implicit rollback is not done. If implicit rollback by postgreSQL is done, I will get 25P02 next time I try some query so I have lost the transaction anyway unless there is a way to recover from 25P02.

Amaresh

-O
Indiatimes Email now powered by APIC Advantage. Help!
" " Help

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Schmidt 2006-04-02 22:06:06 pg_dump syntax
Previous Message Amaresh Wakkar 2006-04-02 14:54:10 Re: 25P02, current transaction is aborted, commands ignored