Re: Rework of collation code, extensibility
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-hackers@postgresql.org
Date: 2023-01-11T16:37:22Z
Lists: pgsql-hackers
On Thu, 22 Dec 2022 at 11:11, Jeff Davis <pgsql@j-davis.com> wrote: > > 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. The patch does not apply on top of HEAD as in [1], please post a rebased patch: === Applying patches on top of PostgreSQL commit ID c971a5b27ac946e7c94f7f655d321279512c7ee7 === === applying patch ./v5-0003-Refactor-pg_locale_t-routines.patch .... Hunk #1 FAILED at 88. ... 1 out of 9 hunks FAILED -- saving rejects to file src/backend/utils/adt/formatting.c.rej patching file src/backend/utils/adt/like.c Hunk #1 FAILED at 24. Hunk #2 succeeded at 97 (offset 1 line). 1 out of 2 hunks FAILED -- saving rejects to file src/backend/utils/adt/like.c.rej [1] - http://cfbot.cputube.org/patch_41_4058.log Regards, Vignesh
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