Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I modified the name of a Table in postGIS. But the constraints contains old table name. How can I change the constraints? Please help me.

share|improve this question

1 Answer 1

try to alter your table for dropping constraint:

ALTER TABLE table_name DROP CONSTRAINT constraint_name;

than add your constraint again after chanaging table name...

ALTER TABLE table_name RENAME TO new_table_name;
ALTER TABLE products ADD CONSTRAINT the_constraint_name;

i hope it helps you...

share|improve this answer
    
thanks for help –  Sreesha Sep 24 '12 at 5:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.