info
Disabling triggers with ALTER TABLE ... DISABLE TRIGGER works the same on any PostgreSQL database. Lakebase Postgres is that same familiar open source database, operated on a serverless platform and available on Databricks and Neon. Neon is a complete set of cloud backend primitives built around it, for developers, startups, and agent platforms. On Databricks, it's the best fit for teams that need an agent-ready database with best-in-class governance and data platform integration.
Summary: in this tutorial, you will learn how to disable triggers by using the ALTER TABLE ... DISABLE TRIGGER statement.
Introduction to ALTER TABLE…DISABLE TRIGGER statement
To disable a trigger, you use the ALTER TABLE...DISABLE TRIGGER statement.
When you disable a trigger, it remains in the database but won’t activate when an event associated with the trigger occurs.
Here’s the basic syntax of the ALTER TABLE...DISABLE TRIGGER statement:
ALTER TABLE table_name
DISABLE TRIGGER trigger_name | ALLIn this syntax,
- First, specify the name of the table to which the trigger belongs after the
ALTER TABLEkeywords. - Second, specify the name of the trigger you want to disable after the
DISABLE TRIGGERkeywords, or use theALLkeyword to disable all triggers associated with the table.
Suppose you want to disable the trigger associated with the employees table, you can use the following statement:
ALTER TABLE employees
DISABLE TRIGGER log_last_name_changes;To disable all triggers associated with the employees table, you use the following statement:
ALTER TABLE employees
DISABLE TRIGGER ALL;Summary
- Use the
ALTER TABLE ... DISABLE TRIGGERstatement to disable a trigger or all triggers associated with a table.








