DROP_COLLATION(7pg17)

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

okay so welcome to DROP_COLLATION(7pg17), straight out of the PostgreSQL 17.11 docs πŸ’… this one is short, sweet, and very β€œknow your ownership before you yeet something” energy.

πŸ’– NAME πŸ’–

DROP_COLLATION β€” remove a collation. That’s the whole mission, bestie: a previously defined collation is getting removed. 🫢

✨ SYNOPSIS ✨

DROP COLLATION [ IF EXISTS ] name [ CASCADE | RESTRICT ]

πŸ¦‹ DESCRIPTION πŸ¦‹

DROP COLLATION removes a previously defined collation. To be able to drop a collation, you must own the collation. No ownership, no drop β€” that’s the rule. πŸ’…

πŸŽ€ PARAMETERS πŸŽ€

  • IF EXISTS β€” do not throw an error if the collation does not exist. A notice is issued in this case. So it’s like, missing-collation chill mode. ✨
  • name β€” the name of the collation. The collation name can be schema-qualified. Slay, qualified names are valid. πŸŽ€
  • CASCADE β€” automatically drop objects that depend on the collation, and in turn all objects that depend on those objects (see Section 5.15). It’s giving domino effect, bestie. πŸ”₯
  • RESTRICT β€” refuse to drop the collation if any objects depend on it. This is the default. So if you don’t say anything, this is what you get. πŸ‘‘

🌸 EXAMPLES 🌸

To drop the collation named german:

DROP COLLATION german;

That’s it. Iconic, simple, done. πŸ’–

πŸ”₯ COMPATIBILITY πŸ”₯

The DROP COLLATION command conforms to the SQL standard, apart from the IF EXISTS option, which is a PostgreSQL extension. So that’s the PostgreSQL-specific little extra, iykyk. πŸ’«

πŸ‘‘ SEE ALSO πŸ‘‘

Go read these next, bestie β€” they’re the collation cinematic universe. 🌈


This page was brought to you by PostgreSQL 17.11, dated 2026. Stay collated, bestie πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from