Re: How do I drop a Complicated Constraint Trigger After Delete Execute Procedure?

From: "Wang, Mary Y" <mary(dot)y(dot)wang(at)boeing(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How do I drop a Complicated Constraint Trigger After Delete Execute Procedure?
Date: 2010-02-11 04:38:07
Message-ID: FA20D4C4FEBFD148B1C0CB09913825FC01EBDA2FBC@XCH-SW-06V.sw.nos.boeing.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I guess I could just use
"DELETE FROM pg_trigger WHERE tgname = "RI_ConstraintTrigger_9217018"
I just wanted to make sure that I don't mess up the system table.

Mary

-----Original Message-----
From: Wang, Mary Y
Sent: Wednesday, February 10, 2010 8:10 PM
To: 'Tom Lane'
Cc: pgsql-general(at)postgresql(dot)org
Subject: RE: [GENERAL] How do I drop a Complicated Constraint Trigger After Delete Execute Procedure?

Wow!! Good memory.
I didn't get anything with the 'select * from pg_trigger where tgname = 'bug_assigned_to_fk';' but I got something here :
select * from pg_trigger where tgconstrname = 'bug_assigned_to_fk';
tgrelid | tgname | tgfoid | tgtype | tgenabled | tgisconstr aint | tgconstrname | tgconstrrelid | tgdeferrable | tginitdeferred | tgnarg s | tgattr | tgargs
---------+------------------------------+--------+--------+-----------+----------- -----+--------------------+---------------+--------------+----------------+------- --+--------+---------------------------------------------------------------------- ----
7335118 | RI_ConstraintTrigger_9217018 | 1655 | 17 | t | t | bug_assigned_to_fk | 7329978 | f | f | 6 | | bug_assigned_to_fk\000bug\000users\000FULL\000assigned_to\000user_id\ 000
7335118 | RI_ConstraintTrigger_9217016 | 1654 | 9 | t | t | bug_assigned_to_fk | 7329978 | f | f | 6 | | bug_assigned_to_fk\000bug\000users\000FULL\000assigned_to\000user_id\ 000
7329978 | RI_ConstraintTrigger_9217014 | 1644 | 21 | t | t | bug_assigned_to_fk | 7335118 | f | f | 6 | | bug_assigned_to_fk\000bug\000users\000FULL\000assigned_to\000user_id\ 000
(3 rows)

What do I do with them?
------------------------------------------------
Mary Y Wang

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Wednesday, February 10, 2010 8:02 PM
To: Wang, Mary Y
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] How do I drop a Complicated Constraint Trigger After Delete Execute Procedure?

"Wang, Mary Y" <mary(dot)y(dot)wang(at)boeing(dot)com> writes:
> Ok. I typed the correct name this time, and got the same error.
> "drop trigger bug_assigned_to_fk on users;
> ERROR: DropTrigger: there is no trigger bug_assigned_to_fk on relation users "
> "drop trigger bug_assigned_to_fk on bug;
> ERROR: DropTrigger: there is no trigger bug_assigned_to_fk on relation bug"

Huh. Do you get anything from
select * from pg_trigger where tgname = 'bug_assigned_to_fk'; or
select * from pg_trigger where tgconstrname = 'bug_assigned_to_fk'; ? If I recall the 7.1 code at all, it has to be printing one or the other of those fields as the name shown in the FK error message ...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-02-11 04:42:27 Re: How do I drop a Complicated Constraint Trigger After Delete Execute Procedure?
Previous Message u235sentinel 2010-02-11 04:14:54 Postgres Triggers issue