DROP_EVENT_TRIGGER(7pg18)
๐ DROP EVENT TRIGGER ๐
okay bestie, gather round, because this is the PostgreSQL 18.6 Documentation page for DROP EVENT TRIGGER and it's literally the "breakup text" of the SQL world. You wrote a trigger, you loved a trigger, and now? it's gone. No cap.
โจ NAME โจ
DROP_EVENT_TRIGGER โ remove an event trigger ๐ซถ
โจ SYNOPSIS โจ
DROP EVENT TRIGGER [ IF EXISTS ] name [ CASCADE | RESTRICT ]
look at her. short. iconic. does exactly one thing. periodt. ๐
โจ DESCRIPTION โจ
so DROP EVENT TRIGGER removes an existing event trigger. that's it, that's the whole vibe. ๐
but WAIT โ plot twist โ to run this command, the current user must be the owner of the event trigger. not your bestie, not your coworker, not the intern who swears they have access. you. the owner. no exceptions, no "but I have a really good reason." ๐
โจ PARAMETERS โจ
IF EXISTSโ do not throw an error if the event trigger does not exist. Instead, a notice is issued in this case. it's giving "no drama, just a little note in the chat." ๐nameโ the name of the event trigger to remove. say it with your chest. ๐CASCADEโ automatically drop objects that depend on the trigger, and in turn all objects that depend on those objects (see Section 5.15). this is the domino effect, bestie. one push and the whole friend group goes down with it. ๐ข๐ฅRESTRICTโ refuse to drop the trigger if any objects depend on it. This is the default. the responsible queen behaviour. she said "not on my watch." ๐ง
โจ EXAMPLES โจ
Destroy the trigger snitch:
DROP EVENT TRIGGER snitch;
not the trigger named snitch getting dropped ๐ญ she really told on everyone and now she's gone. rip bozo, you will not be missed. ๐ชฆโจ
โจ COMPATIBILITY โจ
There is no DROP EVENT TRIGGER statement in the SQL standard.
so yeah, this is a PostgreSQL original, a true main character move. the standard could never. ๐
โจ SEE ALSO โจ
CREATE EVENT TRIGGER(CREATE_EVENT_TRIGGER(7)) ๐ฑALTER EVENT TRIGGER(ALTER_EVENT_TRIGGER(7)) ๐ฆ
the holy trinity: make her, change her, delete her. iykyk. ๐
and that's the whole page, bestie!! ๐โจ this was PostgreSQL 18.6, dated 2026, and the manual section is DROP EVENT TRIGGER(7) โ go forth and drop responsibly, and remember: CASCADE is forever ๐๐ซถ๐
๐ฆ where this page comes from
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms