DROP_EVENT_TRIGGER(7pg17)
π 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 π
CREATE EVENT TRIGGER(CREATE_EVENT_TRIGGER(7))ALTER EVENT TRIGGER(ALTER_EVENT_TRIGGER(7))
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
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql17 17.11-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms