Re: Drop Column with Foreign Key Problem - Mailing list pgsql-general

From Tom Lane
Subject Re: Drop Column with Foreign Key Problem
Date
Msg-id 6919.1088722744@sss.pgh.pa.us
Whole thread Raw
In response to Drop Column with Foreign Key Problem  ("Thomas Chille (spoon)" <t.chille@spoon.de>)
List pgsql-general
"Thomas Chille (spoon)" <t.chille@spoon.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



pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: postgresql +AMD64 +big address spaces - does it work?
Next
From: Juan Jose Costello Levien
Date:
Subject: Re: Error loading trigger in C