pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Postgres 12: backend crashes when creating non-deterministic collation
Date: Fri, 4 Oct 2019 16:21:26 +0200
Message-ID: <ac33f189-2bcd-3be6-1dee-cb44c34ddb20@gmx.net> (raw)
In-Reply-To: <9ad3c92eb92c39c1256f151ff553110f9928fadf.camel@cybertec.at>
References: <58edf560-f277-8993-abe3-22d57dc11c50@gmx.net>
	<9ad3c92eb92c39c1256f151ff553110f9928fadf.camel@cybertec.at>

Laurenz Albe schrieb am 04.10.2019 um 16:04:
>> I was trying to learn how the new non-deterministic collations in v12
>> work, but the following makes the backend crash:
>>
>> CREATE COLLATION de_ci (provider = icu, locale = 'de-x-icu',
>> deterministic = false);
>>
>> Which leads to:
>>
>> 2019-10-04 11:54:23 CEST   LOG:  server process (PID 7540) was
>> terminated by exception 0xC0000005
>>
>> I might have misunderstood how to use deterministic to create a case-
>> insensitive collation, but I don't think the backend should crash if
>> I do something wrong ;)
>
> Yes, there is a bug somewhere.  FWIW, it works on my Linux system.

It also works on Windows when I specify "correct" locale names - the above seems to be an edge case.
Is it worth the effort to report that through the bug reporting form?

> To get a case insensitive collation you'd have to use something like
>
>      LOCALE = 'de-DE-u-ks-level2'

Creating works, but apparently on Windows ICU does not support this.

The following works fine on Linux (returns both rows), but not on Windows (returns nothing)

   create collation de_ci (provider = icu, locale = 'de-DE-u-ks-level2', deterministic = false);
   create table test (name text);
   insert into test values ('FOO'), ('Foo');

   select *
   from test
   where name = 'foo' collate de_ci;

Not a big deal, but might surprise some people.

Thomas





view thread (14+ messages)  latest in thread

Message-ID: <ac33f189-2bcd-3be6-1dee-cb44c34ddb20@gmx.net>
Permalink:  ../ac33f189-2bcd-3be6-1dee-cb44c34ddb20@gmx.net/
Also on:    postgresql.org/message-id/ac33f189-2bcd-3be6-1dee-cb44c34ddb20@gmx.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: Postgres 12: backend crashes when creating non-deterministic collation
  In-Reply-To: <ac33f189-2bcd-3be6-1dee-cb44c34ddb20@gmx.net>
  References: <58edf560-f277-8993-abe3-22d57dc11c50@gmx.net> <9ad3c92eb92c39c1256f151ff553110f9928fadf.camel@cybertec.at> <ac33f189-2bcd-3be6-1dee-cb44c34ddb20@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox