Re: Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block

Поиск
Список
Период
Сортировка
От toruvinn
Тема Re: Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block
Дата
Msg-id op.ur57x9ue33x80h@insanity.lain.pl
обсуждение исходный текст
Ответ на Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block  ("Durgabhavani.g" <durgabhavani.g@ocimumbio.com>)
Список pgsql-bugs
On Fri, 10 Apr 2009 11:55:03 +0200, Durgabhavani.g <durgabhavani.g@ocimumbio.com> wrote:
>     I am trying to port my application from Oracle to PostGREs. I have a
> problem while doing so. In my application i need to update record if the
> delete on the respective record is failed due to Constraint Violation.
> But SQL Error: 0, SQLState: 25P02 ERROR [JDBCExceptionReporter] ERROR:
> current transaction is aborted, commands ignored until end of
> transaction block is being generated while updating the record. But with
> Oracle i am able to do this.

What you may be looking for is described here:
http://www.postgresql.org/docs/current/interactive/sql-savepoint.html
In short: creating a savepoint, executing a query and - in case the query fails - rolling back to the savepoint created
previouslyrestores the transaction state. In your case, you should create the SAVEPOINT before executing the DELETE
query,and when it fails - ROLLBACK to the savepoint and continue normally. As far as I understand your code/intentions,
thatis. 

--
ru

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt
Следующее
От: Martin Pitt
Дата:
Сообщение: Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt