On 2016-04-30 02:08, wolfg...@alle-noten.de wrote:
> Hi,
> 
> I have a table with a row update trigger that is quite slow.
> The trigger finction basically sets some bits in a "changed" column
> depending on which values really changed.
> For some bulk updates it can be determined in advance that the
> trigger function will not have any effect.
> Is there any way to run an update query and specify that it should not
> activate the trigger.
> I know that I can disable the trigger and reenable it later;
> however other concurrent updates mights need it


I always disable the trigger, run the update, and enable the trigger
within a transaction. This locks the table and will prevent other
sessions from doing updates without the trigger (I run it during
off-hours if it is going to take more time than is acceptable).


-- Stephen




-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to