disable triggers isolated to transaction only?

From: Vick Khera <vivek(at)khera(dot)org>
To: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: disable triggers isolated to transaction only?
Date: 2010-03-02 17:48:07
Message-ID: 2968dfd61003020948x60e84d8aiaa1df01658853cb3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm planning to split a large table into partitions. During the
migration, all new data will be added to the sub-tables, and I will be
moving the data from the master table to the proper sub tables at the
same time. The trick is that I have an INSERT trigger to keep track
of various counters. I need to be able to disable that trigger for
the data I'm moving, yet leave it intact for the new data being
inserted.

My question is this: will ALTER TABLE ONLY $subtable DISABLE TRIGGER
ALL within a transaction only affect my transaction, or will it affect
anyone inserting into this subtable. If it blocks external inserts
that's ok since my transactions are small while moving the data. I
guess at worse I lock the table.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Said Ramirez 2010-03-02 17:52:41 Re: tipo de dato
Previous Message Lee Hachadoorian 2010-03-02 17:21:24 Array columns vs normalized table