From: Amaresh Wakkar <babu_moshay@indiatimes.com>
To: Oliver Jowett <oliver@opencloud.com>
To: Amaresh Wakkar <babu_moshay@indiatimes.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: 25P02, current transaction is aborted, commands ignored
Date: Sun, 02 Apr 2006 20:33:07 +0530
Message-ID: <200604021424.TAA06182@WS0005.indiatimes.com> (raw)
"Oliver Jowett" wrote:
Amaresh Wakkar wrote:
> Thanks!!
>
> The code works fine after I added savepoints around "Okay,even if
> fails" statement.
>
> What is the idea behind taking this route(i.e all statements ignored
> 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..
>>>>Ok, Thanks!!
> In this particular case, the autocommit is off and the statement has
> failed so there is no risk of changes being made permanent(presumable PG
> would rollback at database level the changed buffers etc.,) unless the
> commit() method is invoked. Why then explicit rollback is needed? Is it
> not best if it is left to programmer to handle this in exception
> 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).
>>>>> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: babu_moshay@indiatimes.com, oliver@opencloud.com
Subject: Re: 25P02, current transaction is aborted, commands ignored
In-Reply-To: <200604021424.TAA06182@WS0005.indiatimes.com>
References: <200604021424.TAA06182@WS0005.indiatimes.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox