Re: [GENERAL] Drop CHECK Constraint

2011-02-21 Thread Christian Ullrich
* Yan Cheng CHEOK wrote: I was wondering, is there any good way to drop a constraint? Currently, I am making assumption on the check constraint name. ALTER TABLE backup_table ADD CHECK (fk_lot_id = 99); If I want to drop the above CHECK constraint, I will do ALTER TABLE backup_table DROP C

[GENERAL] Drop CHECK Constraint

2011-02-21 Thread Yan Cheng CHEOK
I was wondering, is there any good way to drop a constraint? Currently, I am making assumption on the check constraint name. Although it works at current moment, I do not feel comfortable with it in long run. For example : ALTER TABLE backup_table ADD CHECK (fk_lot_id = 99); If I want to dr

Re: [GENERAL] drop check constraint

2001-02-07 Thread Stephan Szabo
Yes. You need to remove the row on pg_relcheck and then change the value of relchecks for the row in pg_class for the relation the check constraint is on. On Wed, 7 Feb 2001, Tamsin wrote: > Hello, > > Is it possible to drop a check constraint in any way without > dropping/recreating the tabl

[GENERAL] drop check constraint

2001-02-07 Thread Tamsin
Hello, Is it possible to drop a check constraint in any way without dropping/recreating the table? I've managed to drop foreign key constraints by dropping the associated triggers, but check constraints don't seem to create triggers and there isn't an alter table drop constraint command. Is the