Re: disable triggers isolated to transaction only?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vick Khera <vivek(at)khera(dot)org>
Cc: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: disable triggers isolated to transaction only?
Date: 2010-03-03 00:16:53
Message-ID: 26862.1267575413@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Vick Khera <vivek(at)khera(dot)org> writes:
> 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.

Yeah, ALTER TABLE will lock the table anyway. As long as you re-enable
the triggers before committing, it won't affect any other transaction.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Fischer 2010-03-03 01:20:01 Trigger help - updates to column data with null values
Previous Message Thomas Kellerer 2010-03-02 23:22:25 Not all functions in schema pg_catalog are "visible"