From: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: list triggers - how? |
Date: | 2003-07-27 08:59:38 |
Message-ID: | bg049o$jul$1@main.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Holger Marzen schrieb:
> How can I list defined triggers on PostgreSQL 7.1.3?
>
I'm using the following statement:
select trg.tgname, tbl.relname,
case trg.tgtype & cast(2 as int2)
when 0 then 'AFTER'
else 'BEFORE'
end as trigger_type,
case trg.tgtype & cast(28 as int2)
when 16 then 'UPDATE'
when 8 then 'DELETE'
when 4 then 'INSERT'
when 20 then 'INSERT, UPDATE'
when 28 then 'INSERT, UPDATE, DELETE'
when 24 then 'UPDATE, DELETE'
when 12 then 'INSERT, DELETE'
end as trigger_event
from pg_trigger trg, pg_class tbl
where trg.tgrelid = tbl.oid
Have a look at: http://www.postgresql.org/docs/7.3/static/catalogs.html
Regards
Thomas
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno BAGUETTE | 2003-07-27 11:26:24 | RE : [GENERAL] Reminder => Poll @ Codewalkers |
Previous Message | Holger Marzen | 2003-07-27 08:01:48 | list triggers - how? |