Re: Turning off triggers ?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Glen Eustace <geustace(at)godzone(dot)net(dot)nz>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Turning off triggers ?
Date: 2002-11-25 15:51:09
Message-ID: 20021125074911.S53697-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 25 Nov 2002, Glen Eustace wrote:

> Is there a way that all the triggers associated with a table can be
> turned off ? I would like to be able to bulk load a table ( I have to
> use inserts not copy ) and I don't want the triggers to fire. Once
> loaded I want to turn them back on again. This process will be repeated
> quite often ( during the development phase).

If you don't expect to be adding triggers during the process and you're a
superuser, you can set reltriggers to 0 in the appropriate pg_class row
and then set it back at the end. Pg_dump's data only dump does something
similar.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2002-11-25 16:19:23 RC2 Packaged in Preparation for a Wednesday Release ...
Previous Message Matthew Nuzum 2002-11-25 15:00:51 Re: GUI for Postgres Management? PostgreSQL vs MySQL.