Re: [PATCH] Fix ICU strength not being honored in collation rules - Mailing list pgsql-hackers

From Luis Felippe
Subject Re: [PATCH] Fix ICU strength not being honored in collation rules
Date
Msg-id 4G1WKg5bpUDJUBNH4oBrP7nAdahKwMIXxVkJzEzJEDvqN8VOU9xsYiwWyGzzchVWEZAcyxjpRekAwXCcsDpPZtBMSAXrf1Rm-2T8q-jiEO4=@protonmail.com
Whole thread Raw
In response to Re: [PATCH] Fix ICU strength not being honored in collation rules  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers
Daniel Verite wrote:

> Yes. There was a previous report recently [1], with a proposed fix [2]
> identical to yours.

It is great to know this is already being addressed.

> The fix may change sort results for collations affected by the problem
> (that's the point of the fix!), so even if it's for the better, it's
> theorically
> a breaking change for databases that may have collations like that.

While this is technically a breaking change, it only affects cases where the strength attribute is explicitly set.
Caseswhere the strength is indirectly set — for example, by specifying a locale with a different default strength (e.g.
und-u-ks-level-2)— continue to behave as before, where providing any tailoring rules resets the strength to tertiary. 

Explicitly setting the strength attribute is, by definition, an intentional change to the collation strength.
PostgreSQLcurrently accepts this attribute but silently ignores it, which is a clear correctness issue rather than an
intentionalbehavioral characteristic. The fix therefore aligns the implementation with user expectations and with the
documentedmeaning of the attribute. 

Given that the change only impacts explicitly misbehaving cases and brings behavior in line with both specification and
intent,I think it would be reasonable — and beneficial — to include it in the next minor release. 


Best regards,

Luis



pgsql-hackers by date:

Previous
From: Jelte Fennema-Nio
Date:
Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions