pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: sathiya psql <sathiya.psql@gmail.com>
To: Sergey Benner <sergey.benner@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: list user created triggers
Date: Wed, 12 Mar 2008 10:47:05 +0530
Message-ID: <f966c2ee0803112217j4fe05f9axf84da7dc9b598d5d@mail.gmail.com> (raw)
In-Reply-To: <f966c2ee0803112107i30a3249ah1e10b89cb678a32b@mail.gmail.com>
References: <281d31b40803110715u567ce1f6t91d12a3546dce980@mail.gmail.com>
	<281d31b40803110733o496e4c51ic8f2c36d0eded2af@mail.gmail.com>
	<f966c2ee0803112107i30a3249ah1e10b89cb678a32b@mail.gmail.com>

>
> 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

view thread (3+ messages)

Message-ID: <f966c2ee0803112217j4fe05f9axf84da7dc9b598d5d@mail.gmail.com>
Permalink:  ../f966c2ee0803112217j4fe05f9axf84da7dc9b598d5d@mail.gmail.com/
Also on:    postgresql.org/message-id/f966c2ee0803112217j4fe05f9axf84da7dc9b598d5d@mail.gmail.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sathiya.psql@gmail.com, sergey.benner@gmail.com
  Subject: Re: list user created triggers
  In-Reply-To: <f966c2ee0803112217j4fe05f9axf84da7dc9b598d5d@mail.gmail.com>

* 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