Avoid transaction abot if/when constraint violated

From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Avoid transaction abot if/when constraint violated
Date: 2010-01-14 22:12:16
Message-ID: 482E80323A35A54498B8B70FF2B87980043AA6BBF0@azsmsx504.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello !

I have a long list of records I want to insert into a table in such a way as I can trap and report any/all constraint violations before rolling back (or opting to commit). Unfortunately, after I hit the first constraint violation, it aborts the transaction, and then reports "ERROR: current transaction is aborted, commands ignored until end of transaction block".

Is there a way around this?

Thanks in Advance!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2010-01-14 23:35:14 Re: Avoid transaction abot if/when constraint violated
Previous Message Joshua J. Kugler 2010-01-14 21:55:04 Re: Moving database cluster