Re: Disabling triggers / constraints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Disabling triggers / constraints
Дата
Msg-id 12234.1085161877@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Disabling triggers / constraints  (Jorge Pereira <jrp@ideiaprima.com>)
Список pgsql-patches
Jorge Pereira <jrp@ideiaprima.com> writes:
> I can understand your concerns. But for the sake of context for context,
> here's an example of the code generated by pg_dump --disable-triggers:

I'm well aware of what pg_dump does.  Please observe that what it does
(a) affects only one table at a time, and (b) requires superuser
privileges.

> What I propose is

> | SET disable_triggers=1;
> | -- INSERT / UPDATE statements;
> | SET disable_triggers=0;

This is totally unsafe, the more so the more triggers you have.

> I don't see a need to do it on a per-table basis,

Security: a global disable may break things you didn't even know
existed.  In particular I do not wish to see such a feature able to
disable triggers on tables you don't own.

            regards, tom lane

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: pg_ctl patch to integrate apache's rotatelogs
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Cancel/Kill backend functions