diff options
author | Peter Eisentraut | 2024-12-17 11:48:58 +0000 |
---|---|---|
committer | Peter Eisentraut | 2024-12-17 11:52:29 +0000 |
commit | d3aad4ac57c5592ade77916404e6d8a989a1d6a1 (patch) | |
tree | 5a131f30f7cba2380960c7dfa5c1190eea906ff4 /src/include | |
parent | 60be3f9f0a64a071822c0711f69c7b5f6467d84f (diff) |
Remove ts_locale.c's t_isdigit(), t_isspace(), t_isprint()
These do the same thing as the standard isdigit(), isspace(), and
isprint() but with multibyte and encoding support. But all the
callers are only interested in analyzing single-byte ASCII characters.
So this extra layer is overkill and we can replace the uses with the
standard functions.
All the t_is*() functions in ts_locale.c are under scrutiny because
they don't use the common locale provider framework but instead use
the global libc locale settings. For the functions being touched by
this patch, we don't need all that anyway, as mentioned above, so the
simplest solution is to just remove them. The few remaining t_is*()
functions will need a different treatment in a separate patch.
pg_trgm has some compile-time options with macros such as
KEEPONLYALNUM. These are not documented, and the non-default variant
is not supported by any test cases. As part of this undertaking, I'm
removing the non-default variant, as it is in the way of cleanup. So
in this case, the not-KEEPONLYALNUM code path is gone.
Reviewed-by: Jeff Davis <pgsql@j-davis.com>
Discussion: https://www.postgresql.org/message-id/flat/653f3b84-fc87-45a7-9a0c-bfb4fcab3e7d%40eisentraut.org
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/tsearch/ts_locale.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/include/tsearch/ts_locale.h b/src/include/tsearch/ts_locale.h index abc21a7ebea..71e1f78fa36 100644 --- a/src/include/tsearch/ts_locale.h +++ b/src/include/tsearch/ts_locale.h @@ -39,11 +39,8 @@ typedef struct #define COPYCHAR(d,s) memcpy(d, s, pg_mblen(s)) -extern int t_isdigit(const char *ptr); -extern int t_isspace(const char *ptr); extern int t_isalpha(const char *ptr); extern int t_isalnum(const char *ptr); -extern int t_isprint(const char *ptr); extern char *lowerstr(const char *str); extern char *lowerstr_with_len(const char *str, int len); |