Skip site navigation (1) Skip section navigation (2)

Re: Disabling Trigger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Prasad dev" <esteem3300(at)hotmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Disabling Trigger
Date: 2005-08-30 04:42:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
"Prasad dev" <esteem3300(at)hotmail(dot)com> writes:
> Does any one know how disable a specific trigger i know the following way to 
> disable trigger but it disables system generated default triggers too.

FWIW, PG 8.1 will have a supported command for that.

> I also tried the following
> UPDATE pg_trigger SET tgenabled = FALSE where tgname='trigger_name';
> But this too doesnt work.

That should work in recent releases, though you do have an issue of
whether backends will notice it right away.  A dummy update on the
pg_class row is the best way around that problem AFAIK.

What PG version are you using, and what exactly does "not work" mean?

			regards, tom lane

In response to


pgsql-novice by date

Next:From: Jaromír KamlerDate: 2005-08-30 06:30:29
Subject: Fwd: Re: Fwd: Re: question - plpgsql and query on table given by variable
Previous:From: Lance ArlausDate: 2005-08-30 04:25:36
Subject: Re: triggers: how to check if a field changed?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group