DROP_EVENT_TRIGGER(7pg16)
π DROP EVENT_TRIGGER π
okay so bestie, this is the DROP EVENT TRIGGER page from the PostgreSQL 16 docs β it's short, it's sweet, and it's about yeeting an event trigger into the void. let's get into it π«Ά
β¨ SYNOPSIS β¨
DROP EVENT TRIGGER [ IF EXISTS ] name [ CASCADE | RESTRICT ]
that's the whole vibe. three little pieces, slay.
π DESCRIPTION π
DROP EVENT TRIGGER removes an existing event trigger. literally just deletes it. gone. no cap.
one tiny thing though β to actually run this command, the current user must be the owner of the event trigger. not your bestie, not your group chat, you. if it's not yours, the vibes are off and it won't work π
πΈ PARAMETERS πΈ
IF EXISTSβ okay so this is the "don't be dramatic" flag. do not throw an error if the event trigger doesn't exist. instead a notice is issued in this case. so like, it'll tell you, but it won't scream at you πnameβ the name of the event trigger to remove. the one you're dropping. the main character of this operation πCASCADEβ highkey the dangerous one. automatically drop objects that depend on the trigger, and in turn all objects that depend on those objects (see Section 5.14). it's giving domino effect. it's giving chain reaction. be sure before you commit, fr fr π₯RESTRICTβ the cautious icon. refuse to drop the trigger if any objects depend on it. and bestie, this is the default, so it's already looking out for you β¨
π¦ EXAMPLES π¦
destroy the trigger snitch:
DROP EVENT TRIGGER snitch;
not the trigger being named snitch π anyway β snitch is gone. periodt. π
β COMPATIBILITY β
there is no DROP EVENT TRIGGER statement in the SQL standard. so if you go looking for it in the standard, don't. it's a PostgreSQL thing. iykyk π
π SEE ALSO π
CREATE EVENT TRIGGER(CREATE_EVENT_TRIGGER(7)) β for when you wanna make one instead of destroy itALTER EVENT TRIGGER(ALTER_EVENT_TRIGGER(7)) β for when you just wanna tweak it a lil
okay that's the page!! π this was PostgreSQL 16.15 documentation, dated 2026, and the manual name is DROP EVENT TRIGGER β go forth and drop responsibly, bestie π§π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-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