Re: fixing tsearch locale support

2024-12-17 Thread Peter Eisentraut
On 12.12.24 19:20, Jeff Davis wrote: On Mon, 2024-12-09 at 11:11 +0100, Peter Eisentraut wrote: I have expanded this patch set.  The first three patches are the same as before.  I have added a new patch that gets rid of lowerstr() from ts_locale.c and replaces it with the standard str_tolower()

Re: fixing tsearch locale support

2024-12-17 Thread Peter Eisentraut
On 17.12.24 16:25, Andreas Karlsson wrote: On 12/13/24 6:07 PM, Jeff Davis wrote: OK, that's fine with me for this patch series. Eventually though, I think we should have built-in versions of these ASCII functions. Even if there's no actual problem, it would more clearly indicate that we only c

Re: fixing tsearch locale support

2024-12-17 Thread Andreas Karlsson
On 12/13/24 6:07 PM, Jeff Davis wrote: OK, that's fine with me for this patch series. Eventually though, I think we should have built-in versions of these ASCII functions. Even if there's no actual problem, it would more clearly indicate that we only care about ASCII at that particular call site

Re: fixing tsearch locale support

2024-12-13 Thread Jeff Davis
On Fri, 2024-12-13 at 07:16 +0100, Peter Eisentraut wrote: > isdigit() and isspace() in particular are widely used throughout the > backend code without such concerns.  I think the assumption is that > this > is not a problem in practice: For multibyte encodings, these > functions > would only b

Re: fixing tsearch locale support

2024-12-12 Thread Peter Eisentraut
On 12.12.24 19:14, Jeff Davis wrote: On Mon, 2024-12-02 at 11:57 +0100, Peter Eisentraut wrote: t_isdigit() and t_isspace() are just used to parse various configuration and data files, and surely we don't need support for encoding- dependent multibyte support for parsing ASCII digits and ASCII s

Re: fixing tsearch locale support

2024-12-12 Thread Jeff Davis
On Mon, 2024-12-09 at 11:11 +0100, Peter Eisentraut wrote: > I have expanded this patch set.  The first three patches are the same > as > before.  I have added a new patch that gets rid of lowerstr() from > ts_locale.c and replaces it with the standard str_tolower() that > everyone else is using

Re: fixing tsearch locale support

2024-12-12 Thread Jeff Davis
On Mon, 2024-12-02 at 11:57 +0100, Peter Eisentraut wrote: > t_isdigit() and t_isspace() are just used to parse various > configuration > and data files, and surely we don't need support for encoding- > dependent > multibyte support for parsing ASCII digits and ASCII spaces.   > ... So these can

Re: fixing tsearch locale support

2024-12-09 Thread Peter Eisentraut
I have expanded this patch set. The first three patches are the same as before. I have added a new patch that gets rid of lowerstr() from ts_locale.c and replaces it with the standard str_tolower() that everyone else is using. lowerstr() and lowerstr_with_len() in ts_locale.c do the same thi