I am trying to disable the triggers for one of my PostgreSQL table using the following code
def disable_triggers(self):
with connection.cursor() as cursor:
cursor.execute('ALTER TABLE "frontend_awsregions" DISABLE TRIGGER ALL;')
But this is giving me following error
... ...
return self.cursor.execute(sql) django.db.utils.ProgrammingError: permission denied: "RI_ConstraintTrigger_a_25437" is a system trigger
when I execute the same query in PGAdmin, its working properly