Thread: Problem with dropping a FOREIGN KEY

Problem with dropping a FOREIGN KEY

From
Harry Yau
Date:
Dear:
Hi, everybody. I've got some problem with dropping constraint trigger.
I've added a foreign key to my table by something likes below:

ALTER TABLE tableA
ADD CONSTRAINT testtrigger
FOREIGN KEY (columnA)
REFERENCES tableb(columnB)
ON UPDATE CASCADE
ON DELETE CASCADE

After that, I found out that I got three more Create Constraint Trigger
statment in the dump. Now, I wanna drop this foreign key and add another
one. Then I tried the following:

DROP CONSTRAINT testtrigger ON tableA.

However, I keep getting error message as:
PostgreSQL said: ERROR: DropTrigger: there is no trigger testrigger on
relation tableA.

I have surfed around the mail list.
I saw someone have the same problem or similar problem with me.
They can solve it by deleting the corresponding row in pg_trigger on
adjusting the retriggers counts in assoicated pg_class.
However, I can't find those files.
I am wondering that is there any other way to drop that constraint
trigger without invoking the pg_trigger and pg_class file??

Thank you for your patientness

Harry Yau