Stopping a transaction as soon as an error occurs

From: "Ridvan Lakas ng Bayan S(dot) Baluyos" <ridvan(at)baluyos(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Stopping a transaction as soon as an error occurs
Date: 2008-07-17 04:49:17
Message-ID: 7f4f9efa0807162149g1dd78caenf111961196f7a64a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi list,

I am dumping a series of data. Basically I'm migrating the tables from one
database to another. However, I wanted the transaction to stop immediately
as soon as the error below occurs:

psql:gravy.all.schema.sql:142136: ERROR: current transaction is aborted,
commands ignored until end of transaction block

What happens is that it continues to do the transaction even if there's
already a transaction and I'm having hard time catching it. I need to know
which line number the error first occured so that I can check my dump file
and do the necessary remedy.

Thanks,

Ridvan

--
Laurence J. Peter - "Originality is the fine art of remembering what you
hear but forgetting where you heard it."

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message John DeSoi 2008-07-17 11:36:23 Re: Stopping a transaction as soon as an error occurs
Previous Message Shane Ambler 2008-07-14 16:04:30 Re: Two novice questions