DROP_COLLATION(7pg13)
π DROP COLLATION (7pg13) β the PostgreSQL 13.23 glow-up edition β¨
okay bestie, so this is the DROP COLLATION page from the PostgreSQL 13.23 docs, and honestly? it's a short one, but she's iconic. let's get into it π
πΈ NAME πΈ
DROP_COLLATION β remove a collation. that's it. that's the whole vibe. we're deleting a collation, no cap π
β¨ SYNOPSIS β¨
DROP COLLATION [ IF EXISTS ] name [ CASCADE | RESTRICT ]
look at her. so clean. so simple. main character energy fr π«Ά
π DESCRIPTION π
so DROP COLLATION removes a previously defined collation. like, it's gone. bye. π
but here's the catch, and it's giving gatekeeping honestly: to be able to drop a collation, you must own the collation. not your friend, not your cousin, you. own it or don't touch it, periodt π
π¦ PARAMETERS π¦
IF EXISTSβ do not throw an error if the collation does not exist. instead a notice is issued in this case. she's chill like that, no drama, just a little "hey btw it wasn't there" πnameβ the name of the collation. and yes, the collation name can be schema-qualified. go off with yourschema.nameβ¨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 "and your little dog too" π careful, she's thorough.RESTRICTβ refuse to drop the collation if any objects depend on it. and this one? this is the default. she's the cautious friend. love her for it π
π EXAMPLES π
to drop the collation named german:
DROP COLLATION german;
one line. one collation. gone. slay π₯
π COMPATIBILITY π
the DROP COLLATION command conforms to the SQL standard π β apart from the IF EXISTS option, which is a PostgreSQL extension. so like, mostly standard, just a lil extra seasoning from Postgres. iykyk πΈ
π§ SEE ALSO π§
ALTER COLLATION(ALTER_COLLATION(7))CREATE COLLATION(CREATE_COLLATION(7))
ngl bestie, quick recap so you never forget: own the collation to drop it,IF EXISTS= no error + a notice,CASCADEtakes dependent stuff with it, andRESTRICTis the default and will straight up refuse π
okay that's the page!! make sure to check out ALTER_COLLATION(7) and CREATE_COLLATION(7) too, they're the siblings and they're also iconic π«Ά
mwah π β this has been PostgreSQL 13.23, 2025, DROP COLLATION (7). go drop something responsibly, queen π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-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