DROP_EVENT_TRIGGER(7pg15)

πŸ“¦ version 15.19, in opensuse-leap 16.0

✨ NAME ✨

Okay so this is the PostgreSQL 15.19 docs page for DROP EVENT TRIGGER(7), and the main-character command here is DROP_EVENT_TRIGGER β€” it removes an event trigger. Periodt. πŸ’…

🌸 SYNOPSIS 🌸

DROP EVENT TRIGGER [ IF EXISTS ] name [ CASCADE | RESTRICT ]

πŸ’– DESCRIPTION πŸ’–

DROP EVENT TRIGGER removes an existing event trigger. To execute this command, the current user must be the owner of the event trigger. No cap β€” owner vibes only. πŸ‘‘

πŸŽ€ PARAMETERS πŸŽ€

  • IF EXISTS β€” do not throw an error if the event trigger does not exist. A notice is issued in this case. So it’s like, β€œbestie, it wasn’t there, but we’re not crashing over it.” 🫢
  • name β€” the name of the event trigger to remove. Simple. Iconic. ✨
  • CASCADE β€” automatically drop objects that depend on the trigger, and in turn all objects that depend on those objects (see Section 5.14). This one goes all the way down the dependency chain, so yeah, highkey powerful. πŸ”₯
  • RESTRICT β€” refuse to drop the trigger if any objects depend on it. This is the default. Safe and sound, lowkey the responsible queen. πŸ›‘οΈ

πŸ¦‹ EXAMPLES πŸ¦‹

Destroy the trigger snitch:

DROP EVENT TRIGGER snitch;

Not the snitch getting dropped πŸ˜­πŸ’€ β€” but yes, that’s literally the example.

🌈 COMPATIBILITY 🌈

There is no DROP EVENT TRIGGER statement in the SQL standard. So this is very much a PostgreSQL-specific slay. πŸ’«

πŸ’œ SEE ALSO πŸ’œ


πŸ’– That’s the whole page, bestie β€” brought to you by PostgreSQL 15.19, dated 2026, and filed under DROP EVENT TRIGGER(7). Mwah! πŸ’–

πŸ“¦ where this page comes from