DROP_COLLATION(7pg16)

πŸ“¦ version 16.15, in opensuse-leap 16.0

πŸ’– 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 like schema_name.collation_name if 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 say CASCADE, you get RESTRICT β€” 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 πŸ‘‘


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