DROP_EVENT_TRIGGER(7pg17)

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

πŸ’… DROP EVENT TRIGGER πŸ’…

okay so bestie, you're in the PostgreSQL 17.11 Documentation and this little icon is called DROP_EVENT_TRIGGER β€” it's the manual page for yeeting an event trigger into the void 🫢


✨ NAME ✨

DROP_EVENT_TRIGGER β€” remove an event trigger πŸ—‘οΈβœ¨


🌸 SYNOPSIS 🌸

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

like, that's the whole vibe. three little pieces, pick your combo πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

DROP EVENT TRIGGER removes an existing event trigger. periodt. it's gone, it's not coming back, we don't talk about it anymore πŸ’€

okay but here's the gatekeeping part: to run this command, the current user must be the owner of the event trigger. not your friend, not your cousin, you. if that's not you, this is not your main character moment, sorry bestie 😭


πŸŽ€ PARAMETERS πŸŽ€

  • IF EXISTS β€” do not throw an error if the event trigger doesn't exist. instead a notice gets issued. so like, no dramatic meltdown, just a polite little "hey, that wasn't there" πŸ’–
  • name β€” the name of the event trigger to remove. yes, you have to actually say which one. we can't read your mind (yet) 🧚
  • CASCADE β€” automatically drop objects that depend on the trigger, and in turn all objects that depend on those objects (see Section 5.15). it's giving domino effect, it's giving "and you get dropped, and you get dropped" 🌈
  • RESTRICT β€” refuse to drop the trigger if any objects depend on it. this is the default, so if you don't pick anything, the universe picks this one for you πŸ”₯

⭐ EXAMPLES ⭐

destroy the trigger snitch:

DROP EVENT TRIGGER snitch;

ngl that name was asking for it πŸ™ˆ


πŸ’œ COMPATIBILITY πŸ’œ

there is no DROP EVENT TRIGGER statement in the SQL standard. so if someone's like "um actually in the standardβ€”" you can just say it's a PostgreSQL thing, iykyk πŸ’…


🌟 SEE ALSO 🌟


okay that's the whole page, you ate that πŸ“ go forth and drop triggers responsibly, mwah πŸ’‹

PostgreSQL 17.11 Β· 2026 Β· DROP EVENT TRIGGER(7) β€” signing off, love u, bye πŸ‘‘πŸ’–

πŸ“¦ where this page comes from