From: Brian McCane <bmccane@mccons.net>
To: pgsql-admin@postgresql.org
Subject: Listing Triggers
Date: Wed, 30 Jan 2002 03:13:51 -0600 (CST)
Message-ID: <20020130025928.O55884-100000@fw.mccons.net> (raw)
In-Reply-To: <20020129180955.B97423-100000@megazone23.bigpanda.com>
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"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: bmccane@mccons.net
Subject: Re: Listing Triggers
In-Reply-To: <20020130025928.O55884-100000@fw.mccons.net>
References: <20020129180955.B97423-100000@megazone23.bigpanda.com> <20020130025928.O55884-100000@fw.mccons.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox