Re: Rework of collation code, extensibility
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Jeff Davis <pgsql@j-davis.com>, pgsql-hackers@postgresql.org
Date: 2023-01-11T14:08:46Z
Lists: pgsql-hackers
On 06.01.23 08:04, Jeff Davis wrote: > The existing code is not great, in my opinion: it doesn't have clear > API boundaries, the comments are insufficient, and lots of special > cases need to be handled awkwardly by callers. That style is hard to > beat when it comes to the raw line count; but it's quite difficult to > understand and work on. > > I think my changes are an improvement, but obviously that depends on > the opinion of others who are working in this part of the code. What do > you think? I think the refactoring that you proposed in the thread "Refactor to introduce pg_strcoll()." was on a sensible track. Maybe we should try to get that done. The multiple-ICU stuff is still experimental and has its own rather impressive thread, so I don't think it's sensible to try to sort that out here.
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