Re: Running query without trigger?

Поиск
Список
Период
Сортировка
От Charles Clavadetscher
Тема Re: Running query without trigger?
Дата
Msg-id 00e601d1d9ae$b6040a30$220c1e90$@swisspug.org
обсуждение исходный текст
Ответ на Running query without trigger?  (hamann.w@t-online.de)
Список pgsql-general
Good morning

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@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
WHENto exclude them from firing the trigger. I am not sure if it is possible to use a condition other than using the
fieldsof 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



В списке pgsql-general по дате отправления:

Предыдущее
От: hamann.w@t-online.de
Дата:
Сообщение: Running query without trigger?
Следующее
От: Berend Tober
Дата:
Сообщение: Re: Running query without trigger?