From: | Brian McCane <bmccane(at)mccons(dot)net> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Listing Triggers |
Date: | 2002-01-30 09:13:51 |
Message-ID: | 20020130025928.O55884-100000@fw.mccons.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-sql |
Greetings,
I am sure I have seen this, but I have searched the docs, and
tried to search the archives, which was a definite exercise in futility.
How can I list the triggers on a specific table? I tried the following:
=> select * from pg_trigger where tgargs like '%foo%' ;
ERROR: Unable to identify an operator '~~' for types 'bytea' and 'unknown'
You will have to retype this query using an explicit cast
The reason I ask is because I had a problem the other day. I dropped a
table and the triggers didn't get deleted. I couldn't do anything with
the other table the trigger was on because all of my constraints failed.
I had to go in and manually find and delete the triggers, which was not an
easy task. Finding a couple needles out of 500+ triggers with no good
tools to help me was not fun. HINT: I dumped pg_trigger with oid's to a
file, found the triggers using grep, and then deleted them by oid.
- brian
Wm. Brian McCane | Life is full of doors that won't open
Search http://recall.maxbaud.net/ | when you knock, equally spaced amid those
Usenet http://freenews.maxbaud.net/ | that open when you don't want them to.
Auction http://www.sellit-here.com/ | - Roger Zelazny "Blood of Amber"
From | Date | Subject | |
---|---|---|---|
Next Message | Ferdinand Smit | 2002-01-30 09:42:36 | Re: INSERT performace. |
Previous Message | Martins Zarins | 2002-01-30 08:15:36 | tags in HTML formated output |
From | Date | Subject | |
---|---|---|---|
Next Message | postgresql | 2002-01-30 13:10:58 | psql and macOSX with 7.2b5 |
Previous Message | lonh SENG | 2002-01-30 03:37:41 | Re: SQL Script |