In PostgreSQl 8.x to disable triggers I do something like:
ALTER TABLE table DISABLE TRIGGER ALL;
When I do this in PostgreSQL 9 I get the following:
my_database=> ALTER TABLE my_table DISABLE TRIGGER ALL;
ERROR: permission denied: "RI_ConstraintTrigger_25366" is a system trigger
PS: This table was created by the user that is running this command.
Any clues on this?
Some triggers are added automatically to enforce constraints, and those can’t be disabled unless you are a superuser. If you only want to disable the normal triggers which you have added then do this: