DROP_COLLATION(7pg16)
π NAME π
okay so bestie, welcome to the PostgreSQL 16.15 docs β page DROP COLLATION(7pg16) β and no cap, this one is literally just "remove a collation." That's the whole vibe. It's giving β¨delete but make it SQLβ¨. To be able to drop a collation, you must own the collation β like, it's your collation, you made it, you can unmake it. Periodt.
π¦ SYNOPSIS π¦
DROP COLLATION [ IF EXISTS ] name [ CASCADE | RESTRICT ]
β¨ DESCRIPTION β¨
DROP COLLATION removes a previously defined collation. Like, if you set up a collation earlier and now you're over it, this is the command you use to yeet it. The one condition? You gotta own it. No ownership, no dropping β that's the rule, iykyk.
π PARAMETERS π
IF EXISTSβ don't throw an error if the collation does not exist. Instead, a notice is issued in this case. So if the thing is already gone, the command isn't gonna have a meltdown β it just quietly lets you know, okay?nameβ the name of the collation. And listen, the collation name can be schema-qualified, so you can be all likeschema_name.collation_nameif you need to be specific. Slay.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 a whole chain reaction β very main character energy, very "this affects everything downstream." Just so you know.RESTRICTβ refuse to drop the collation if any objects depend on it. This is the default. So if you don't sayCASCADE, you getRESTRICTβ safe, cautious, lowkey protective. That's the vibe.
πΈ EXAMPLES πΈ
To drop the collation named german:
DROP COLLATION german;
That's it. One line. Clean. Iconic.
π COMPATIBILITY π
The DROP COLLATION command conforms to the SQL standard, apart from the IF EXISTS option, which is a PostgreSQL extension. So yeah, it's standard-compliant except for that one little extra β which honestly just makes it better. Fr fr.
π SEE ALSO π
ALTER COLLATION(ALTER_COLLATION(7))CREATE COLLATION(CREATE_COLLATION(7))
okay bestie, that's the whole page β PostgreSQL 16.15, 2026 edition, DROP COLLATION(7pg16) signing off! π
π«Ά Go drop those collations responsibly. β¨
π¦ 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