SELECT event_object_table, trigger_name, action_timing, event_manipulation, action_statement
FROM information_schema.triggers
WHERE trigger_schema NOT IN ('pg_catalog', 'information_schema');
SELECT pg_get_triggerdef(t.oid)
FROM pg_trigger t
JOIN pg_class c ON c.oid = t.tgrelid
JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE t.tgname = 'trigger_name_here'; -- replace trigger_name_here with the name of the trigger you're investigating
/var/log/postgresql/
or by running:SHOW log_directory;
ALTER TABLE table_name DISABLE TRIGGER trigger_name_here; -- Replace table_name and trigger_name_here accordingly.
Note: Before disabling a trigger, ensure you understand the implications, as this could affect data integrity or business logic enforced by the trigger.
(Perfect for DevOps & SREs)
(Perfect for DevOps & SREs)