Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.