Re: Disabling triggers on a relation.

From: Bhuvan A <bhuvansql(at)myrealbox(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Disabling triggers on a relation.
Date: 2002-12-02 09:46:06
Message-ID: Pine.LNX.4.44.0212021514010.1504-100000@Bhuvan.bksys.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rajesh Kumar Mallah. 2002-12-02 13:13:22 Re: Unable to automaticly load Postmaster.
Previous Message Rajesh Kumar Mallah. 2002-11-30 21:22:33 Disabling triggers on a relation.