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.