Re: Drop Column with Foreign Key Problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas Chille (spoon)" <t(dot)chille(at)spoon(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Drop Column with Foreign Key Problem
Date: 2004-07-01 22:59:04
Message-ID: 6919.1088722744@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Thomas Chille (spoon)" <t(dot)chille(at)spoon(dot)de> writes:
> If i dump the DB i can not found the constraint 'participant_employee' anymore but 3 triggers
> belonging to this constraint are still in the DB:

> CREATE CONSTRAINT TRIGGER participant_employee

It looks to me like you created this database by loading a dump from an
older (pre-7.3) Postgres? If so, there are not any dependency links
from those triggers to the columns involved, and so dropping the columns
doesn't cause the triggers to go away. You'll need to drop the triggers
by hand.

There is a contrib script (contrib/adddepend) that tries to add the
missing dependencies in an upgraded database. I've never used it and
am not sure how reliable it is, but it probably beats trying to identify
the trouble spots by hand.

See the 7.3 release notes for more about this issue.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2004-07-01 23:07:27 Re: row level grants
Previous Message Tom Lane 2004-07-01 22:52:19 Re: postgresql +AMD64 +big address spaces - does it work?