Re: Disabling triggers on a relation. - Mailing list pgsql-admin

From Bhuvan A
Subject Re: Disabling triggers on a relation.
Date
Msg-id Pine.LNX.4.44.0212021514010.1504-100000@Bhuvan.bksys.co.in
Whole thread Raw
In response to Disabling triggers on a relation.  ("Rajesh Kumar Mallah." <mallah@trade-india.com>)
List pgsql-admin
> What is the correct method of temporarily
> disabling all triggers from a table?

Disable:
db=# update pg_class set reltriggers = '0' where relname = 'your_table';

Enable:
db=# update pg_class set reltriggers = (select count(*) from pg_trigger
where pg_class.oid = tgrelid) where relname = 'your_table';

>
>
> also is there any command/function  to show the
> trigger defination ? like pg_index_def does for indexes?
>

Not sure.

regards,
bhuvaneswaran


pgsql-admin by date:

Previous
From: "yudha"
Date:
Subject: Unable to automaticly load Postmaster.
Next
From: "Rajesh Kumar Mallah."
Date:
Subject: Re: Unable to automaticly load Postmaster.