-On [20030908 22:42], Bruce Momjian ([EMAIL PROTECTED]) wrote: >I assume MODIFY would allow you to alter the constraint without >re-checking all the rows, as would be required by DROP/ADD. However, if >you are modifying the constraint, wouldn't we have to recheck all the >rows anyway. Of course, one idea would be to allow MODIFY to make >changes that _don't_ require rechecking, but I have no idea what such >changes would be.
I might have misread/misremembered something: Constraint State Modification You can use the MODIFY CONSTRAINT clause of the ALTER TABLE statement to change the following constraint states: * DEFERRABLE or NOT DEFERRABLE * INITIALLY DEFERRED or INITIALLY IMMEDIATE * RELY or NORELY * USING INDEX ... * ENABLE or DISABLE * VALIDATE or NOVALIDATE * EXCEPTIONS INTO ... http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_32a.htm#2103836 I wonder if it is possible to have ALTER TABLE ... MODIFY CONSTRAINT ... CHECK ... Because what I can imagine, and please correct me if I miss something in my thought pattern, you have a small gap between dropping a constraint and adding the new one allowing the possibility of missing checks. Or would this be solved by adding a second constraint under another constraint name with the new constraint values and then dropping the older one? If so, then ALTER TABLE ... RENAME CONSTRAINT would come in handy. -- Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai PGP fingerprint: 2D92 980E 45FE 2C28 9DB7 9D88 97E6 839B 2EAC 625B http://www.tendra.org/ | http://www.in-nomine.org/~asmodai/diary/ Things should be made as simple as possible, but not any simpler... ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]