DROP_COLLATION(7pg18)
๐ 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,CASCADEdoes not play โ it takes the whole friend group down with it.RESTRICTis 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 ๐
ALTER COLLATION(ALTER_COLLATION(7))CREATE COLLATION(CREATE_COLLATION(7))
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
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- opensuse-leap 16.0: postgresql18 18.6-160000.1.1 ยท PostgreSQL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms