Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B29842E2E85 for ; Wed, 12 Mar 2008 02:17:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 61458-04 for ; Wed, 12 Mar 2008 02:17:06 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.241]) by postgresql.org (Postfix) with ESMTP id BD6972E2EAC for ; Wed, 12 Mar 2008 02:17:06 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so658838ana.33 for ; Tue, 11 Mar 2008 22:17:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=05aZ7eOP2AcCZ3/3kPSc5vNVHa37t8jtPbU7OvQ3h/s=; b=AQJJY2AbdE9JY9CX0SILVC0B5rJ1ed7kQB4LHHBaqs2roR6Jm84YSxWVkgF0B0/yvXIgb5lyJjNahuMOrfeEG0nNcYljcFxnWCfbSxaaJGbsHP9nTcfew7+pxWyCni3UruRK1WVH4AsfcFEwXb2GJYwWnDpZa5mlUxCbHqdA3xY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Y90xA4YJw3DK4kUTZpkJSiSJrQzf1XVewsQTAxEyZjXu7FlN+lz2uqH1tUK9ZzQIvV0ueY7L7cVxhWRyrS+vxPQ4cESTqcGaq6ZicOooMEqtDFTJaJ5onBWoy3w/FNRW+TZSd4lFg++3XvYYMvpQ3trFQenc5vxzq0SoOFREq7Q= Received: by 10.100.229.13 with SMTP id b13mr15278273anh.7.1205299025901; Tue, 11 Mar 2008 22:17:05 -0700 (PDT) Received: by 10.100.105.20 with HTTP; Tue, 11 Mar 2008 22:17:05 -0700 (PDT) Message-ID: Date: Wed, 12 Mar 2008 10:47:05 +0530 From: "sathiya psql" To: "Sergey Benner" Subject: Re: list user created triggers Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5556_17313074.1205299025889" References: <281d31b40803110715u567ce1f6t91d12a3546dce980@mail.gmail.com> <281d31b40803110733o496e4c51ic8f2c36d0eded2af@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/238 X-Sequence-Number: 29192 ------=_Part_5556_17313074.1205299025889 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > > 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 ------=_Part_5556_17313074.1205299025889 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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
------=_Part_5556_17313074.1205299025889--