Re: DROP COLLATION vs pg_collation question

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: DROP COLLATION vs pg_collation question
Date: 2024-06-12 07:03:02
Message-ID: d3384b9f1e870eda5f6a01b008209398b18b36d4.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2024-06-11 at 23:15 +0200, Karsten Hilbert wrote:
> 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.

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chandy G 2024-06-12 07:47:43 postgres table statistics
Previous Message Dominique Devienne 2024-06-12 06:53:55 Re: Unexpected Backend PID reported by Notification