RE: is there a way to disable a specific check constraint without dropping it?

2017-06-19 Thread Eric Owhadi
Bummer, I have a need where I want to have constraint check only on new inserted data. Is there a magic CQD to do that? Eric From: Anoop Sharma [mailto:anoop.sha...@esgyn.com] Sent: Monday, June 19, 2017 2:32 PM To: user@trafodion.incubator.apache.org Subject: RE: is there a way to disable a

Re: is there a way to disable a specific check constraint without dropping it?

2017-06-19 Thread Rohit Jain
I think in my message what I remember now was that we had the concept of "trusted loads". In those cases I thought there was a way to disable constraint checking to avoid a big penalty on performance. But sometimes I get confused about what customers asked for and what we had implemented (old

RE: is there a way to disable a specific check constraint without dropping it?

2017-06-19 Thread Anoop Sharma
when a constraint (check, unique or RI) is added to a table with existing data, then that constraint is validated against existing data. An error is returned and constraint creation fails if data validation fails. For check constr failure, this error is returned: >>alter table tc add constraint

RE: is there a way to disable a specific check constraint without dropping it?

2017-06-19 Thread Eric Owhadi
I don’t believe constraints are checked against existing data. Only new data upserted are being validated. Am I correct? Meaning if I add constraint on existing data, there is no complaining about existing data violating constraints? Eric From: Rohit Jain [mailto:rohit.j...@esgyn.com] Sent:

Re: is there a way to disable a specific check constraint without dropping it?

2017-06-19 Thread Rohit Jain
Right, because re-enabling will have to recheck the constraint anyway. Rohit On Jun 19, 2017, at 1:26 PM, Eric Owhadi > wrote: Hi Dave, It was a trick I was trying to use to store sql statement associated with a table as a check constraint,

RE: is there a way to disable a specific check constraint without dropping it?

2017-06-19 Thread Eric Owhadi
Hi Dave, It was a trick I was trying to use to store sql statement associated with a table as a check constraint, without enforcing it. I now know I can use the _MD_.TEXT for this purpose, so no worries about this feature anymore. Thanks, Eric From: Dave Birdsall