public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: Karsten Hilbert <[email protected]>
Cc: [email protected]
Subject: Re: DROP COLLATION vs pg_collation question
Date: Sun, 16 Jun 2024 19:37:08 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Sun, 2024-06-16 at 11:27 +0200, Karsten Hilbert wrote:
> > the collations themselves
> > are defined by an external library, so the implementation is shared.
>
> Which in turn means I cannot at all truly _remove_ collations
> from a cluster at the SQL level, only make them invisible
> (and thereby not-to-be-used) inside a particular database by
> removing them from pg_collations via DROP COLLATION, right ?
As far as PostgreSQL is concerned, you can remove them.
You cannot remove the C library, but a PostgreSQL user can only use
the collation if there is a collation defined in PostgreSQL.
(Actually, that's not quite true: in CREATE DATABASE, you can use
ICU collations. That does not depend on the collations defined in
pg_collation.)
Also, there is nothing that keeps a user from running CREATE COLLATION
to create a collation in a schema where the user can CREATE objects.
I wouldn't try too hard to make it impossible for users to use a
collation you don't want. Dropping the collations is good enough to
keep a user from using the wrong collation by mistake.
Yours,
Laurenz Albe
view thread (6+ 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