Search Postgresql Archives

Re: getting all constraint violations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there a way to temporarily suspend constraint checking for a particular constraint inside of the transaction, try the insert again, capture the next violation, then the next, etc... then rollback after all have been collected?

-dave 

-----Original Message-----
From: Tom Lane [mailto:tgl@xxxxxxxxxxxxx] 
Sent: Friday, May 21, 2010 1:36 PM
To: Gauthier, Dave
Cc: pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  getting all constraint violations 

"Gauthier, Dave" <dave.gauthier@xxxxxxxxx> writes:
> I have a table with many constraints.  A user tries to insert a record that violates many of them.  The error message I get 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux