Re: Disabling Triggers - Mailing list pgsql-general

From Tom Lane
Subject Re: Disabling Triggers
Date
Msg-id 4427.1115826212@sss.pgh.pa.us
Whole thread Raw
In response to Disabling Triggers  ("Mark Borins" <mark.borins@rigadev.com>)
List pgsql-general
"Mark Borins" <mark.borins@rigadev.com> writes:
> Does anyone know if it is possible to run an update statement on a table and
> for only that statement disable the trigger on the table?

No, but why fire the update if not needed?  Make the trigger do
something like

    UPDATE foo SET boolcol = true WHERE ... AND not boolcol;

            regards, tom lane

pgsql-general by date:

Previous
From: Himanshu Baweja
Date:
Subject: how to calculate checkpoint_segments
Next
From: Richard Huxton
Date:
Subject: Re: JOIN on set of rows?