DROP_COLLATION(7pg18)

๐Ÿ“ฆ version 18.6, in opensuse-leap 16.0

๐Ÿ’– DROP COLLATION ๐Ÿ’–

okay bestie, welcome to the DROP COLLATION(7) page from the PostgreSQL 18.6 Documentation โœจ this is the part where we say bye-bye to a collation, and honestly? it's giving spring cleaning ๐Ÿงน๐Ÿฆ‹


โœจ NAME โœจ

DROP_COLLATION โ€” remove a collation ๐Ÿ’…


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

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

๐ŸŒธ DESCRIPTION ๐ŸŒธ

so DROP COLLATION removes a previously defined collation. that's it, that's the job, she's out ๐Ÿ‘‘

but listen โ€” to be able to drop a collation, you must own the collation. no owning, no dropping, iykyk ๐Ÿ”


๐Ÿ’… PARAMETERS ๐Ÿ’…

  • IF EXISTS โ€” do not throw an error if the collation does not exist. a notice is issued in this case ๐Ÿ“ข like, no drama, we just quietly note it and move on ๐Ÿซถ
  • name โ€” the name of the collation. the collation name can be schema-qualified ๐Ÿ—‚๏ธ
  • CASCADE โ€” automatically drop objects that depend on the collation, and in turn all objects that depend on <em>those</em> objects (see Section 5.15). it's giving domino effect, and honestly it's a lot ๐Ÿ’€๐Ÿ”ฅ
  • RESTRICT โ€” refuse to drop the collation if any objects depend on it. this is the default. she's cautious, she's careful, she's the main character of self-preservation ๐ŸŒˆ
ngl bestie, CASCADE does not play โ€” it takes the whole friend group down with it. RESTRICT is the default for a reason ๐Ÿšจ

๐ŸŒŸ EXAMPLES ๐ŸŒŸ

to drop the collation named german:

DROP COLLATION german;

periodt. she's gone ๐ŸŽ€


๐Ÿฆ‹ COMPATIBILITY ๐Ÿฆ‹

the DROP COLLATION command conforms to the SQL standard โœจ apart from the IF EXISTS option, which is a PostgreSQL extension โ€” so that one's a little bonus treat from us to you ๐Ÿ“


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


that's the whole page, bestie, you ate that ๐Ÿ’– go forth and drop responsibly โ€” and remember, you gotta own it to drop it ๐Ÿ’…โœจ

PostgreSQL 18.6 ยท 2026 ยท DROP COLLATION(7) โ€” mwah, love u, bye ๐Ÿซถ๐ŸŽ€

๐Ÿ“ฆ where this page comes from