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