From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Urs Steiner <postgresql(at)darkstone(dot)ch> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: list triggers ? |
Date: | 2002-01-21 18:06:00 |
Message-ID: | 20020121100326.I95108-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Mon, 21 Jan 2002, Urs Steiner wrote:
> part of the output of this command was:
>
> NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
> check(s)
> CREATE
>
> now, the creation is actually OK. But how do i find out which triggers
> exist and what they look like ? (generically, in this case i assume it
> to be some default, available fropm the docu)
It depends on what you want to see.
select * from pg_trigger; will give you a list of the triggers. You'd
need to join it with pg_class and pg_proc to get the table name and
function name being called. Something like:
select relname, tgname, tgtype, proname, prosrc, tgisconstraint,
tgconstrname, tgconstrrelid, tgdeferrable, tginitdeferred, tgnargs,
tgattr, tgargs from (pg_trigger join pg_class on tgrelid=pg_class.oid)
join pg_proc on (tgfoid=pg_proc.oid);
If you want to see what the triggers are doing, in the case of the foreign
key ones the code's in C in src/backend/utils/adt/ri_triggers.c I
believe.
From | Date | Subject | |
---|---|---|---|
Next Message | Patrick Welche | 2002-01-21 19:04:50 | Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu problems) |
Previous Message | Trond Eivind =?iso-8859-1?q?Glomsr=F8d?= | 2002-01-21 17:36:59 | Re: pltlc and pltlcu problems |