Re: Create collation reporting the ICU locale display name

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Michael Paquier" <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Create collation reporting the ICU locale display name
Date: 2019-09-12 11:55:37
Message-ID: 396f26cf-f061-4d53-a03b-576262c15f21@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier wrote:

> On Wed, Sep 11, 2019 at 04:53:16PM +0200, Daniel Verite wrote:
> > 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.
>
> Why is that better than the descriptions provided with \dO[S]+ in
> psql?

There is no description for collations created outside of
pg_import_system_collations().

Example:

db=# create collation mycoll(provider=icu, locale='fr-FR-u-ks-level1');
NOTICE: ICU locale: "French (France, colstrength=primary)"

db=# \x auto

db=# \dO+
List of collations
-[ RECORD 1 ]--+------------------
Schema | public
Name | mycoll
Collate | fr-FR-u-ks-level1
Ctype | fr-FR-u-ks-level1
Provider | icu
Deterministic? | yes
Description |

The NOTICE above is with the patch. Otherwise, the "display name"
is never shown nor stored anywhere AFAICS.

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Asim R P 2019-09-12 12:02:41 Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Previous Message Amit Kapila 2019-09-12 11:54:17 Re: [HACKERS] [PATCH] pageinspect function to decode infomasks