DROP_COLLATION(7pg14)
π DROP COLLATION π
okay so this is the DROP COLLATION page from the PostgreSQL 14.24 Documentation, and bestie, it's short, it's sweet, and it's about to make your collation shelf so much cleaner β¨
πΈ NAME πΈ
DROP_COLLATION β remove a collation, that's literally it, that's the whole vibe π
β¨ SYNOPSIS β¨
DROP COLLATION [ IF EXISTS ] name [ CASCADE | RESTRICT ]
look at her. so clean. so composed. main character energy fr fr π
π¦ DESCRIPTION π¦
okay so DROP COLLATION removes a previously defined collation. gone. deleted. not coming to the group chat anymore π
but here's the thing β to be able to drop a collation, you must own the collation. no ownership, no dropping. them's the rules, no cap π«Ά
π PARAMETERS π
IF EXISTSβ do not throw an error if the collation does not exist. instead, a notice is issued in this case. very polite, very demure, very "no drama" of her πnameβ the name of the collation. and yes, the collation name can be schema-qualified. go off with your dots πCASCADEβ automatically drop objects that depend on the collation, and in turn all objects that depend on those objects (see Section 5.14). it's giving domino effect, it's giving "and YOU get dropped, and YOU get dropped" ππRESTRICTβ refuse to drop the collation if any objects depend on it. this is the default. she's the cautious one. she's the responsible friend. we love her for it π«Ά
π EXAMPLES π
to drop the collation named german:
DROP COLLATION german;
that's it. that's the whole example. iconic, honestly π
β COMPATIBILITY β
the DROP COLLATION command conforms to the SQL standard, apart from the IF EXISTS option, which is a PostgreSQL extension. so she's standard-compliant but with a lil extra sparkle, iykyk β¨
π SEE ALSO π
ALTER COLLATION(ALTER_COLLATION(7))CREATE COLLATION(CREATE_COLLATION(7))
go read those too bestie, the whole collation cinematic universe is waiting π¦
lowkey reminder: no ownership = no drop. don't come for collations that aren't yours, queen π
slay, you now understand DROP COLLATION π§π
β xoxo, brought to you by PostgreSQL 14.24, dated 2026, and the icon herself, DROP COLLATION(7) ππ
π¦ 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