| From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
|---|---|
| To: | Michael Davis <mdavis(at)sevainc(dot)com> |
| Cc: | "'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: | Re: [SQL] Removing a constraint? |
| Date: | 2001-01-02 02:40:08 |
| Message-ID: | Pine.BSF.4.21.0101011838090.35081-100000@megazone23.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin pgsql-sql |
It should work if you remove all three triggers for the constraint
using drop trigger, don't delete rows from pg_trigger unless you go
through and manually change the row in pg_class for the relation
the trigger is for.
On Mon, 1 Jan 2001, Michael Davis wrote:
> 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | rhampton | 2001-01-02 07:40:48 | Re: Fw: Redundant databases/real-time backup |
| Previous Message | Michael Davis | 2001-01-02 00:04:41 | Removing a constraint? |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Brett W. McCoy | 2001-01-02 03:00:47 | Re: AUTOINCREMENT--help |
| Previous Message | Macky | 2001-01-02 02:23:23 | AUTOINCREMENT--help |