Re: list user created triggers

From: "sathiya psql" <sathiya(dot)psql(at)gmail(dot)com>
To: "Sergey Benner" <sergey(dot)benner(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: list user created triggers
Date: 2008-03-12 05:17:05
Message-ID: f966c2ee0803112217j4fe05f9axf84da7dc9b598d5d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>
> select usename,relname, tgname, tgtype, proname, prosrc, tgisconstraint,
> > tgconstrname, tgconstrrelid, tgdeferrable, tginitdeferred, tgnargs,
> > tgattr, tgargs from (pg_trigger join pg_class c on tgrelid=c.oid )
> > join pg_proc on (tgfoid=pg_proc.oid) join pg_user pu on
> > c.relowner=pu.usesysid where pu.usename='YOURUSERNAME';
> >
> >
yes i got the answer by this query..

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) where tgname not ilike '%constraint%'
and tgname not ilike 'pg%';

---- the query which you had given shown the implicit triggers which is
created for maintaining the constraints..

-- so the query which i had given will show the user created triggers...

THANKS

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message sathiya psql 2008-03-12 05:27:09 migration of 7.4 to 8.1
Previous Message sathiya psql 2008-03-12 04:07:52 Re: list user created triggers