Subject: DROP COLLATION vs pg_collation question

From: Karsten Hilbert <[email-masked]>
Date: Tue, 11 Jun 2024 23:15:46 +0200

Dear list members,

maybe a naive question but I was unable to find an answer in
the fine manual (sv_SE being an example)

Does running

	DROP COLLATION IF EXISTS pg_catalog."sv_SE"

also remove the corresponding row from pg_collation (assuming
nothing depends on collation sv_SE) ?

Experimentation seems to hint that way but I was unable to
confirm.

Thanks
Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B

---

From: Laurenz Albe <[email-masked]>
Date: Wed, 12 Jun 2024 09:03:02 +0200

> Experimentation seems to hint that way but I was unable to

Yes, that will delete a row from "pg_collation".  System catalogs
like "pg_collation" is where the database metadata are actually
stored.

Note that with DROP COLLATION you can only remove collations
that belong to the encoding of your current database.

Yours,
Laurenz Albe