Re: Current transaction is aborted, commands ignored until end of transaction block - Mailing list pgsql-sql

From Feike Steenbergen
Subject Re: Current transaction is aborted, commands ignored until end of transaction block
Date
Msg-id CAK_s-G0rs=D2t55N+opbBfq9O2p8Y1X9Fve70OdcawxMe7Oiag@mail.gmail.com
Whole thread Raw
In response to Current transaction is aborted, commands ignored until end of transaction block  (Jan Bakuwel <jan.bakuwel@greenpeace.org>)
List pgsql-sql
I recently started receiving this error as well, this was because I
disabled autocommit.
With the following option in .psqlrc the error doesn't wait for a
rollback but automatically creates a savepoint allowing you to fix the
error and continue:

This is now in my .psqlrc:

\set AUTOCOMMIT off
\set ON_ERROR_ROLLBACK on

http://www.postgresql.org/docs/9.1/static/app-psql.html look for
ON_ERROR_ROLLBACK

"When on, if a statement in a transaction block generates an error,
the error is ignored and the transaction continues. When interactive,
such errors are only ignored in interactive sessions, and not when
reading script files."


pgsql-sql by date:

Previous
From: Misa Simic
Date:
Subject: Re: ignore unique violation OR check row exists
Next
From: Samuel Gendler
Date:
Subject: Fwd: i want small information regarding postgres