DROP_DOMAIN(7pg14)
π DROP DOMAIN(7) β the PostgreSQL 14.24 glow-up
okay bestie, so this is a PostgreSQL 14.24 manual page for DROP DOMAIN, and it's genuinely one of the shorter ones so you're gonna eat this UP β¨ (also it lives in section 7 of the manual, hence the (7) β iykyk π)
πΈ NAME πΈ
DROP_DOMAIN β remove a domain, bestie. that's it. that's the whole vibe check. π¦
β¨ SYNOPSIS β¨
DROP DOMAIN [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
look at that. clean. iconic. no notes. π
π DESCRIPTION π
so DROP DOMAIN removes a domain. periodt. π
but listen β only the owner of a domain can remove it. not your friend, not your mutual, not the group chat. the owner. so if it's not yours, don't touch it, fr fr π
π§ PARAMETERS π§
IF EXISTSβ do not throw an error if the domain doesn't exist. like, be cool about it. instead a notice is issued in this case π«Ά (super handy when you're not sure if it's even there and you don't want the whole script to come crashing down)nameβ the name of an existing domain, optionally schema-qualified. it's the target. the main character. the domain in question πCASCADEβ automatically drop objects that depend on the domain (such as table columns), and then, in turn, all objects that depend on those objects. it's giving domino effect π see Section 5.14 β the dependency chain is realRESTRICTβ refuse to drop the domain if any objects depend on it. this is the default, so if you just vibes your way through and don't say anything, this is what you get. lowkey the safe one πΈ
heads up:CASCADEis the chaotic option here β it takes everything downstream with it.RESTRICTis the "wait, are you sure?" option and it's the default for a reason, bestie π
π EXAMPLES π
to remove the domain box:
DROP DOMAIN box;
look at her go. simple, elegant, slay. β¨
π COMPATIBILITY π
this command conforms to the SQL standard, except for the IF EXISTS option β that one is a PostgreSQL extension. so like, it's standards-compliant, she just has a little extra flair π (and honestly? we love that for her)
π¦ SEE ALSO π¦
CREATE DOMAIN(CREATE_DOMAIN(7)) β making the domain in the first place πALTER DOMAIN(ALTER_DOMAIN(7)) β changing it up when your needs shift β
and that's the whole page, bestie π«Ά go forth and drop responsibly π
β xoxo, your girl at PostgreSQL 14.24, dated 2026 πΈβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-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