public inbox for [email protected]
help / color / mirror / Atom feedFrom: Karsten Hilbert <[email protected]>
To: Laurenz Albe <[email protected]>
Cc: [email protected]
Subject: Re: DROP COLLATION vs pg_collation question
Date: Fri, 14 Jun 2024 22:08:04 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Am Thu, Jun 13, 2024 at 09:49:46AM +0200 schrieb Laurenz Albe:
> > > Note that with DROP COLLATION you can only remove collations
> > > that belong to the encoding of your current database.
>
> src/backend/catalog/namespace.c:
>
> /*
> * get_collation_oid - find a collation by possibly qualified name
> *
> * Note that this will only find collations that work with the current
> * database's encoding.
> */
> Oid
> get_collation_oid(List *collname, bool missing_ok)
Thanks.
Are collations per-database or per-cluster objects ?
I am asking because I seem to not be enabled to
1) use a collation that's intended for an encoding different
from the database encoding
-> makes sense
2) remove a collation that's intended for an encoding
different from the database encoding
-> so far so good, ignore them, but
3) update collation version information in pg_collations for
collations intended for an encoding different from the
database encoding (ALTER COLLATION ... REFRESH VERSION fails)
which in effect would mean that -- upon change of collation
versions in the underlying operating system (ICU update, libc
update) -- one would have to live with outdated version
information in pg_collations short of dump/sed/restore or
some such ?
I'm pretty sure I am overlooking something.
Best,
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: DROP COLLATION vs pg_collation question
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox