Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Gauthier, Dave
ginal Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Friday, May 21, 2010 3:10 PM To: Gauthier, Dave Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] getting all constraint violations "Gauthier, Dave" writes: > Is there a way to temporarily suspend constra

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Tom Lane
"Gauthier, Dave" writes: > 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? You could do something like

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Richard Broersma
On Fri, May 21, 2010 at 11:46 AM, Gauthier, Dave wrote: > 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? If

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Gauthier, Dave
...@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" writes: > I have a table with many constraints. A user tries to insert a record that > violates many of

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Tom Lane
"Gauthier, Dave" 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.

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Merlin Moncure
On Fri, May 21, 2010 at 1:27 PM, Gauthier, Dave wrote: > Hi: > > > > 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? the database stops processing af

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread A. Kretschmer
In response to Gauthier, Dave : > Hi: > > > > 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? I think that isn't possible: the first violation

[GENERAL] getting all constraint violations

2010-05-21 Thread Gauthier, Dave
Hi: 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? I'm running 8.3.4 on linux, running through perl/DBI, getting the error message from $dbh->errstr.