Good morning

> -----Original Message-----
> From: pgsql-general-ow...@postgresql.org 
> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of hamann.w@t-
> online.de
> Sent: Samstag, 9. Juli 2016 08:20
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] Running query without trigger?
> 
> 
> Hi,
> 
> a table is associated with a trigger for normal use.
> An admin (someone with ALTER privilege) can disable tthe trigger, run some 
> bulk update, and then re-enable it. This
> means, however, that  normal user activity has to be locked out.
> 
> There are two possible scenarios: the bulk update would not cause trigger 
> activity at all, because of the values and
> columns involved.
> or - the bulk update is followed by another bulk transaction that  is 
> equivalent to trigger invocations per row.
> At least in the first case, running this particular query without triggering 
> the trigger, but normal activity still
> going on, would be really great Is there a way to achieve this?

In general it helps better if you provide the version of PostgreSQL that you 
are using.

If you have a way to identify the bulk update from a record field, e.g. a 
timestamp or something like this, you may use WHEN to exclude them from firing 
the trigger. I am not sure if it is possible to use a condition other than 
using the fields of the old or new record.

https://www.postgresql.org/docs/current/static/sql-createtrigger.html

Regards
Charles

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



-- 
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