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