Reputation: 3459
Here is the query to disable all triggers in a particular table:
alter table plan_items DISABLE TRIGGER ALL
But I'm getting access issues while executing the query. How do we execute the same query passing for a particular database user? I want to delete triggers that are only part of the mentioned database user.
Upvotes: 0
Views: 556
Reputation: 3459
Seems like the below query does the exact job:
ALTER TABLE table DISABLE TRIGGER USER;
This will disable normal triggers added by the database user.
Upvotes: 0
Reputation: 247950
You can configure a user so that ordinary triggers won't fire for it:
ALTER ROLE myuser SET session_replication_role = replica;
Upvotes: 1