Listing Triggers
От | Brian McCane |
---|---|
Тема | Listing Triggers |
Дата | |
Msg-id | 20020130025928.O55884-100000@fw.mccons.net обсуждение исходный текст |
Ответ на | Re: SQL Script (Stephan Szabo <sszabo@megazone23.bigpanda.com>) |
Ответы |
Re: Listing Triggers
Re: Listing Triggers |
Список | pgsql-admin |
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"
В списке pgsql-admin по дате отправления: