postgresqltriggersstatus

How can you tell if a trigger is enabled in PostgreSQL?


My googling-fu is failing me. How to know if a PostgreSQL trigger is disabled or not?


Solution

  • It's my first day with postresql, but I think you can check the trigger state via pg_trigger system table: http://www.postgresql.org/docs/current/static/catalog-pg-trigger.html

    The columns you will need are tgrelid and tgenabled.