Re: Create collation reporting the ICU locale display name

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Create collation reporting the ICU locale display name
Date: 2019-09-12 18:30:17
Message-ID: CAH2-WzkQ3K5NTcZfxsdmQaMdOGO5kkGSyDAYUOBWKioZcMCb-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 11, 2019 at 7:53 AM Daniel Verite <daniel(at)manitou-mail(dot)org> wrote:
> The 'locale' or 'lc_collate/lc_ctype' argument of an ICU collation may
> have a complicated syntax, especially with non-deterministic
> collations, and input mistakes in these names will not necessarily be
> detected as such by ICU.

That's a real problem.

> The "display name" of a locale is a simple way to get human-readable
> feedback about the characteristics of that locale.
> pg_import_system_collations() already push these as comments when
> creating locales en masse.
>
> I think it would be nice to have CREATE COLLATION report this
> information as feedback in the form of a NOTICE message.
> PFA a simple patch implementing that.

I like this idea.

I wonder if it's possible to display a localized version of the
display string in the NOTICE message? Does that work, or could it? For
example, do you see the message in French?

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-09-12 18:31:37 Re: logical decoding : exceeded maxAllocatedDescs for .spill files
Previous Message Tom Lane 2019-09-12 17:38:17 Re: Leakproofness of texteq()/textne()