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:
ALTER TABLE table DISABLE TRIGGER USER;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With