Re: DROP COLLATION vs pg_collation question - Mailing list pgsql-general

From Karsten Hilbert
Subject Re: DROP COLLATION vs pg_collation question
Date
Msg-id ZnGFgH9oKiynIbY6@hermes.hilbert.loc
Whole thread Raw
In response to Re: DROP COLLATION vs pg_collation question  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: DROP COLLATION vs pg_collation question
List pgsql-general
Am Sun, Jun 16, 2024 at 04:38:49PM -0400 schrieb Tom Lane:

> It's really kind of moot, since you can't change the encoding
> of an existing database.  So any pg_collation entries that are
> for an incompatible encoding cannot be used for anything in that
> database, and they might as well not be there.  The reason they
> are there is merely an implementation detail: CREATE DATABASE clones
> those catalogs from the single copy of pg_collation in template0,
> which therefore had better include all collations that might be
> needed.

I see, and since any database can be used as a template for
more databases, which can be create with an encoding
different from the template, it doesn't really make too much
sense to be able to remove even pg_collation entries.

So, DROP COLLATION is somewhat of a smoking gun pointed at my
foot :-)

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



pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: How to attach partition with primary key
Next
From: Ron Johnson
Date:
Subject: Re: Monitoring logical replication