Re: disabling triggers

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: <mallah(at)trade-india(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: disabling triggers
Date: 2003-06-17 18:49:44
Message-ID: 200306171149.44425.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Mallah,

> in past we tried creating a plpgsql function that takes relname and schema
> and try setting reltriggers=0 on disabling and = (select count(*) from
pg_trigger
> for that relname and schema) on enabling .
>
> we got stuck somewhere and abandoned it , do u think above approach
> would work in principle ?

Yes. As I said, I've used it before.

An additional safeguard you can use is enclosing everything in a transaction,
that is:

BEGIN
disable triggers
load data
enable triggers
END

--
-Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message scott.marlowe 2003-06-17 18:53:48 Re: join syntax
Previous Message Josh Berkus 2003-06-17 18:48:09 Re: join syntax