Re: getting all constraint violations - Mailing list pgsql-general

From Gauthier, Dave
Subject Re: getting all constraint violations
Date
Msg-id 482E80323A35A54498B8B70FF2B879800458B8875B@azsmsx504.amr.corp.intel.com
Whole thread Raw
In response to Re: getting all constraint violations  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: getting all constraint violations  (Richard Broersma <richard.broersma@gmail.com>)
Re: getting all constraint violations  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Is there a way to temporarily suspend constraint checking for a particular constraint inside of the transaction, try
theinsert again, capture the next violation, then the next, etc... then rollback after all have been collected? 

-dave

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, May 21, 2010 1:36 PM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] getting all constraint violations

"Gauthier, Dave" <dave.gauthier@intel.com> writes:
> I have a table with many constraints.  A user tries to insert a record that violates many of them.  The error message
Iget back lists the first violation. How cani I (or can I) get them all? 

You can't, it stops running the command at the first error.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Select max(primary_key) taking a long time
Next
From: Raymond O'Donnell
Date:
Subject: Re: Is postgres installed?