Re: Rework of collation code, extensibility
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: pgsql-hackers@postgresql.org
Date: 2022-12-22T05:40:57Z
Lists: pgsql-hackers
Attachments
- v5-0007-Add-test-module-for-libc-collation-provider-hook.patch (text/x-patch) patch v5-0007
- v5-0006-Support-multiple-libc-collation-provider-librarie.patch (text/x-patch) patch v5-0006
- v5-0005-Add-test-module-for-icu-collation-provider-hook.patch (text/x-patch) patch v5-0005
- v5-0004-Support-multiple-ICU-collation-provider-libraries.patch (text/x-patch) patch v5-0004
- v5-0003-Refactor-pg_locale_t-routines.patch (text/x-patch) patch v5-0003
- v5-0002-Add-pg_strxfrm-and-pg_strxfrm_prefix.patch (text/x-patch) patch v5-0002
- v5-0001-Add-pg_strcoll-and-pg_strncoll.patch (text/x-patch) patch v5-0001
On Sat, 2022-12-17 at 19:14 -0800, Jeff Davis wrote: > Attached is a new patch series. I think there are enough changes that > this has become more of a "rework" of the collation code rather than > just a refactoring. This is a continuation of some prior work[1][2] > in > a new thread given its new scope. Here's version 5. There are a number of fixes, and better tests, and it's passing in CI. The libc hook support is still experimental, but what's working is passing in CI, even on windows. The challenges with libc hook support are: * It obviously doesn't replace all of libc, so the separation is not as clean and there are a number of callers throughout the code that don't necessarily care about specific collations. * libc relies on setlocale() / uselocale(), which is global state and not as easy to track. * More platform issues (obviously) and harder to test. -- Jeff Davis PostgreSQL Contributor Team - AWS
Commits
-
Remove unnecessary #ifdef USE_ICU and branch.
- e0b3074e8944 16.0 landed
-
Refactor to introduce pg_locale_deterministic().
- 6974a8f7682b 16.0 landed
-
Refactor to add pg_strcoll(), pg_strxfrm(), and variants.
- d87d548cd030 16.0 landed
-
Fix MSVC build
- c971a5b27ac9 16.0 cited