Removing a constraint?

From: Michael Davis <mdavis(at)sevainc(dot)com>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>, "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>
Subject: Removing a constraint?
Date: 2001-01-02 00:04:41
Message-ID: 01C07414.F08156B0.mdavis@sevainc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

Does anyone know how to completely and accurately remove or drop a
constraint, specifically a foreign key constraint? I tried to remove a
constraint by deleting it's trigger from pg_triggers. This caused some
undesirable side effects with other tables involved with the constraint. I
have several tables that I need to change the column constraints and
foreign key constraints on. Recreating (drop and create) the table every
time I need to change a column constraint is a pain because all the objects
that reference the table would also need to be recreated (i.e. views and
triggers). How do production DBAs successfully make changes to their
tables?

FYI, I was able to alter table add the same constraint many times. Is this
a problem? This created a new trigger in pg_triggers every time.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Stephan Szabo 2001-01-02 02:40:08 Re: [SQL] Removing a constraint?
Previous Message rhampton 2001-01-01 19:11:04 Fw: Redundant databases/real-time backup

Browse pgsql-sql by date

  From Date Subject
Next Message Macky 2001-01-02 02:23:23 AUTOINCREMENT--help
Previous Message Ferruccio Zamuner 2001-01-01 23:55:12 date infinity