Re: PG-10 + ICU and abbreviated keys

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PG-10 + ICU and abbreviated keys
Date: 2017-11-13 19:48:50
Message-ID: VisenaEmail.54.179a1a8b972c3694.15fb6ea535d@tc7-visena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

På mandag 13. november 2017 kl. 19:07:53, skrev Peter Geoghegan <pg(at)bowt(dot)ie
<mailto:pg(at)bowt(dot)ie>>:
On Mon, Nov 13, 2017 at 12:27 AM, Andreas Joseph Krogh
<andreas(at)visena(dot)com> wrote:
> In PG-10, with ICU enabled, is abbreviated keys now enabled?

Yes. ICU will use abbreviated keys on every platform, including Windows.

> If so, using locale=nb_NO.UTF-8, do I have to use a ICU-specific locale to
take advantage of abbreviated keys?

You need to use an ICU collation. It must be a per-column collation,
as you cannot currently use ICU for an entire database. (This
limitation should be removed in the next release or two.)
 
Ok, so I have to explicitly specify like this:
 
create table test(id serial primary key, name varchar collate "nb_NO" not
null);
 
Will ICU be used here as long as PG is compiled with ICU-suppoert, as the
debian-packages are, or do I have to specify collation-provider?
 
Do I have to explicitly specify collation when using ORDER by on that column
for index and abbreviated keys to be used?
 
Thanks.
 
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>

 

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Rosenstein 2017-11-13 20:11:55 Logical replication + before trigger = ERROR: attempted to lock invisible tuple
Previous Message Peter Geoghegan 2017-11-13 18:07:53 Re: PG-10 + ICU and abbreviated keys