Avoid transaction abot if/when constraint violated - Mailing list pgsql-general

From Gauthier, Dave
Subject Avoid transaction abot if/when constraint violated
Date
Msg-id 482E80323A35A54498B8B70FF2B87980043AA6BBF0@azsmsx504.amr.corp.intel.com
Whole thread Raw
Responses Re: Avoid transaction abot if/when constraint violated  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Avoid transaction abot if/when constraint violated  (Scott Marlowe <scott.marlowe@gmail.com>)
Re: Avoid transaction abot if/when constraint violated  (John R Pierce <pierce@hogranch.com>)
Re: Avoid transaction abot if/when constraint violated  (Dimitri Fontaine <dfontaine@hi-media.com>)
Re: Avoid transaction abot if/when constraint violated  ("Joshua D. Drake" <jd@commandprompt.com>)
List 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!

pgsql-general by date:

Previous
From: "Joshua J. Kugler"
Date:
Subject: Re: Moving database cluster
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Avoid transaction abot if/when constraint violated