Heikki Linnakangas <heikki@enterprisedb.com> writes:
> ohp@pyrenet.fr wrote:
>> I'd love to find a query against pg_triggers giving the table name for
>> each RI_ConstraintTrigger_xxx.
> SELECT t.tgname, c.relname, tgconstrname FROM pg_trigger t, pg_class c
> WHERE t.tgrelid = c.oid AND tgname like 'RI_ConstraintTrigger_%';
Um ... that will find all triggers named like that, but I think Olivier
only wants to find the ones that are not attached to a constraint.
In HEAD it would do to add "... AND tgconstraint = 0" but in 8.2
I'm afraid he's got to dig through pg_depend ...
regards, tom lane