Re: ICU for global collation - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: ICU for global collation
Date
Msg-id 20220111114700.ibv5bdyiumnkj4zk@jrouhaud
Whole thread Raw
In response to Re: ICU for global collation  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers
On Tue, Jan 11, 2022 at 12:36:46PM +0100, Daniel Verite wrote:
> 
> If CREATE DATABASE referred to a collation in the template db,
> either that collation already exists, or the user would have to add it
> to the template db with CREATE COLLATION.
> initdb already populates the template databases with a full set of
> ICU collations through pg_import_system_collations().
> I don't quite see what change you're seeing that would be needed in
> initdb.

Yes, there are already the system collation imported.  But you still need to
make sure that that collation does exist in the template database, and it's
still impossible to connect to that database to check when processing the
CREATE DATABASE.  Also, if the wanted collation wasn't imported by
pg_import_system_collations() and isn't the server's default collation, then
the user would have to allow connection on the template0 database and create
the wanted collation there.  It doesn't seem like something that should be
recommended for a reasonably standard use case.



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Query regarding replication slots
Next
From: "tanghy.fnst@fujitsu.com"
Date:
Subject: [PATCH]Add tab completion for foreigh table