On Sat, Dec 17, 2022 at 7:14 PM Jeff Davis <pgsql@j-davis.com> 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.
Benefits:
1. Clearer division of responsibilities. 2. More consistent between libc and ICU providers. 3. Hooks that allow extensions to replace collation provider libraries. 4. New tests for the collation provider library hooks.
There are a lot of changes, and still some loose ends, but I believe a few of these patches are close to ready.
This set of changes does not express an opinion on how we might want to support multiple provider libraries in core; but whatever we choose, it should be easier to accomplish. Right now, the hooks have limited information on which to make the choice for a specific version of a collation provider library, but that's because there's limited information in the catalog. If the discussion here[3] concludes in adding collation provider library or library version information to the catalog, we can add additional parameters to the hooks.