Re: Disable Triggers - Mailing list pgsql-general

From Geoffrey
Subject Re: Disable Triggers
Date
Msg-id 47BDEEA0.60604@serioustechnology.com
Whole thread Raw
In response to Re: Disable Triggers  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Disable Triggers
List pgsql-general
Tom Lane wrote:
> Andrew Sullivan <ajs@crankycanuck.ca> writes:
>> On Thu, Feb 21, 2008 at 11:44:25AM -0500, Terry Lee Tucker wrote:
>>> table where, when the given trigger does fire, it checks for an entry in the
>>> table at the top of the trigger and takes the appropiate action. The problem
>>> is that the solution for disabling all triggers is used in several utility
>>> programs and I'm trying to avoid changing a bunch of code.
>>> I appreciate your input.
>
>> Well, you could try rewriting the function to disable all but the Slony
>> trigger.  But there's something else wrong here.
>
>> I seem to recall that we found some code path where reltriggers wasn't
>> checked properly anyway, so disabling triggers wouldn't work exactly as you
>> are doing it.
>
> No, reltriggers is reliable as a disable-all-triggers mechanism; when
> it's zero the code won't even look in pg_trigger.  But you can't use it
> to disable just some triggers.  I think the bug you are remembering is
> that there's always been a pg_trigger.tgenabled field, but it wasn't
> always honored everywhere, so it was unreliable as a selective-disable
> mechanism until some recent release (I don't recall which, but I'm
> afraid 7.4 is too old).

How might we find out which release it was fixed in?  Back patching
7.4.19 with the fix might be easier then trying to move up to the fixed
version.

--
Until later, Geoffrey

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

pgsql-general by date:

Previous
From: "Gevik Babakhani"
Date:
Subject: Re: Install problem w/8.3 on windows 2000 : application failed to initialize properly (0xc0000022)
Next
From: Justin
Date:
Subject: need some help on figuring out how to write a query