Re: Triggers and COPY - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: Triggers and COPY
Date
Msg-id 3F730472.5040006@persistent.co.in
Whole thread Raw
In response to Triggers and COPY  (Ericson Smith <eric@did-it.com>)
Responses Re: Triggers and COPY
List pgsql-general
Ericson Smith wrote:

> Hi,
>
> Is there any way to prevent a trigger from firing during a COPY operation?
>
> We have a case where we dump the records from a table, truncate it, and
> copy the records back in. However, there is a trigger on that table,
> which will insert a record in a logging table. Is there a way to prevent
> this trigger from firing during the COPY FROM process?

Can you drop the trigger during copy? I don't know following will exactly work
but something like..

begin
drop trigger
copy
recreate trigger
commit;

could do trick for you..

HTH

  Shridhar


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: German translation of PostgreSQL documentation
Next
From: Alvaro Herrera
Date:
Subject: Re: German translation of PostgreSQL documentation