Search Postgresql Archives

Drop CHECK Constraint

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

 



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 drop the above CHECK constraint, I will do

ALTER TABLE backup_table DROP CONSTRAINT backup_table_fk_lot_id_check; (I assume the constraint name will be backup_table_fk_lot_id_check)

Is there any more robust way?

Thanks and Regards
Yan Cheng CHEOK


      

-- 
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