Re: Character expansion with ICU collations

2021-06-21 Thread Finnerty, Jim
I have a proposal for how to support tailoring rules in ICU collations: The ucol_openRules() function is an alternative to the ucol_open() function that PostgreSQL calls today, but it takes the collation strength as one if its parameters so the locale string would need to be parsed before

Re: Character expansion with ICU collations

2021-06-12 Thread Finnerty, Jim
Re: >> Can a CI collation be ordered upper case first, or is this a limitation of ICU? > I don't know the authoritative answer to that, but to me it doesn't make > sense, since the effect of a case-insensitive collation is to throw away > the third-level weights, so there is

Re: Character expansion with ICU collations

2021-06-11 Thread Peter Eisentraut
On 11.06.21 22:05, Finnerty, Jim wrote: You can have these queries return both rows if you use an accent-ignoring collation, like this example in the documentation: CREATE COLLATION ignore_accents (provider = icu, locale = 'und-u-ks-level1-kc-true', deterministic = false);

Re: Character expansion with ICU collations

2021-06-11 Thread Finnerty, Jim
>> You can have these queries return both rows if you use an accent-ignoring collation, like this example in the documentation: CREATE COLLATION ignore_accents (provider = icu, locale = 'und-u-ks-level1-kc-true', deterministic = false); << Indeed. Is the dependency between the

Re: Character expansion with ICU collations

2021-06-09 Thread Tom Lane
Peter Eisentraut writes: > You can have these queries return both rows if you use an > accent-ignoring collation, like this example in the documentation: > CREATE COLLATION ignore_accents (provider = icu, locale = > 'und-u-ks-level1-kc-true', deterministic = false); It occurs to me to wonder

Re: Character expansion with ICU collations

2021-06-09 Thread Peter Eisentraut
On 09.06.21 17:31, Finnerty, Jim wrote: CREATE COLLATION CI_AS (provider = icu, locale=’utf8@colStrength=secondary’, deterministic = false); CREATE TABLE MyTable3 (     ID INT IDENTITY(1, 1), Comments VARCHAR(100) ) INSERT INTO MyTable3 (Comments) VALUES ('strasse') INSERT INTO