Re: Collation & ctype method table, and extension hooks
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Andreas Karlsson <andreas@proxel.se>, pgsql-hackers@postgresql.org
Date: 2025-01-10T00:19:58Z
Lists: pgsql-hackers
Attachments
- v12-0001-Control-ctype-behavior-internally-with-a-method-.patch (text/x-patch) patch v12-0001
- v12-0002-Remove-provider-field-from-pg_locale_t.patch (text/x-patch) patch v12-0002
- v12-0003-Make-provider-data-in-pg_locale_t-an-opaque-poin.patch (text/x-patch) patch v12-0003
- v12-0004-Don-t-include-ICU-headers-in-pg_locale.h.patch (text/x-patch) patch v12-0004
On Mon, 2024-12-02 at 23:58 -0800, Jeff Davis wrote: > On Mon, 2024-12-02 at 16:39 +0100, Andreas Karlsson wrote: > > I feel your first patch in the series is something you can just > > commit. > > Done. > > I combined your patches and mine into the attached v10 series. Here's v12 after committing a few of the earlier patches. I changed the ctype method table to have separate methods for isdigit, isalpha, etc., instead of the combined char_properties method. That's more consistent with how things are currently done. I may still be seeing a tiny perf regression using the same test as [1], but I don't expect it to have a practical impact. Let me know if you think that's a problem. I committed your change to move the version reporting into the provider-specific files. Your other change to lookup_collation() in namespace.c should also account for the code in DefineCollation() -- I don't think it makes sense to refactor one without the other. Regards, Jeff Davis [1] https://www.postgresql.org/message-id/78a1b434ff40510dc5aaabe986299a09f4da90cf.camel%40j-davis.com
Commits
-
Remove provider field from pg_locale_t.
- 8af0d0ab01b4 19 (unreleased) landed
-
Control ctype behavior internally with a method table.
- 5a38104b3642 19 (unreleased) landed
-
Control collation behavior with a method table.
- a2f17f004d22 18.0 landed
-
Move code for collation version into provider-specific files.
- 4f5cef2607c1 18.0 landed
-
Refactor string case conversion into provider-specific files.
- 86a5d6006aff 18.0 landed
-
Move check for ucol_strcollUTF8 to pg_locale_icu.c
- 7167e05fc7d1 18.0 landed
-
Perform provider-specific initialization in new functions.
- 1ba0782ce90c 18.0 landed
-
Refactor the code to create a pg_locale_t into new function.
- 3aa2373c1141 18.0 landed