From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | "Wang, Mary Y" <mary(dot)y(dot)wang(at)boeing(dot)com> |
Subject: | Re: How do I drop a Complicated Constraint Trigger After Delete Execute Procedure? |
Date: | 2010-02-11 01:10:16 |
Message-ID: | 201002101710.17163.adrian.klaver@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wednesday 10 February 2010 4:56:21 pm Wang, Mary Y wrote:
> Hi,
>
> Hmm. Things are still getting interesting around here.
>
> Here is my complicated problem. I tried to delete a user from my users
> table, but it said "ERROR: bug_assigned_to_fk referential integrity
> violation - key in users still referenced from bug" Ok.
Why not try deleting the information in bug that had assigned_to=user_id? Or do
you want to keep that info in bug?
Is this still in version 7.1?
> Then I saw this statement in the .sql file.
> "CREATE CONSTRAINT TRIGGER "bug_assigned_to_fk" AFTER DELETE ON "users"
> FROM "bug" NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE
> PROCEDURE "RI_FKey_noaction_del" ('bug_assigned_to_fk', 'bug', 'users',
> 'FULL', 'assigned_to', 'user_id');" Then I used this command to delete the
> constraint trigger:
> " drop trigger bug_assign_to_fk on bug;"
> I received error:
> "ERROR: DropTrigger: there is no trigger bug_assign_to_fk on relation bug"
> I also tried
> "drop trigger bug_assign_to_fk on user;"
> I received this error:
> "ERROR: DropTrigger: there is no trigger bug_assign_to_fk on relation
> users"
>
> Here is the bug table. Please NOTE there is no constraint listed in the
> bug table.
>
> \d bug
How about \d+ bug ?
> Mary
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Wang, Mary Y | 2010-02-11 01:21:00 | Re: How do I drop a Complicated Constraint Trigger After Delete Execute Procedure? |
Previous Message | Wang, Mary Y | 2010-02-11 00:56:21 | How do I drop a Complicated Constraint Trigger After Delete Execute Procedure? |