diff options
author | Jeff Davis <jdavis@postgresql.org> | 2023-03-17 11:47:35 -0700 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2023-03-17 12:08:46 -0700 |
commit | f413941f41d370a7893caa3e6ed384b89a0577fd (patch) | |
tree | 05a69d2b5ddd453939f3a5346c525fc51ec304ba /src/backend/utils/adt | |
parent | 064709f803c05559d2849a62fdb855fbb91ffeb8 (diff) | |
download | postgresql-f413941f41d370a7893caa3e6ed384b89a0577fd.tar.gz |
Fix t_isspace(), etc., when datlocprovider=i and datctype=C.
Check whether the datctype is C to determine whether t_isspace() and
related functions use isspace() or iswspace().
Previously, t_isspace() checked whether the database default collation
was C; which is incorrect when the default collation uses the ICU
provider.
Discussion: https://postgr.es/m/79e4354d9eccfdb00483146a6b9f6295202e7890.camel@j-davis.com
Reviewed-by: Peter Eisentraut
Backpatch-through: 15
Diffstat (limited to 'src/backend/utils/adt')
-rw-r--r-- | src/backend/utils/adt/pg_locale.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c index 1d3d4d86d3..90ec773c02 100644 --- a/src/backend/utils/adt/pg_locale.c +++ b/src/backend/utils/adt/pg_locale.c @@ -107,6 +107,9 @@ char *localized_full_days[7 + 1]; char *localized_abbrev_months[12 + 1]; char *localized_full_months[12 + 1]; +/* is the databases's LC_CTYPE the C locale? */ +bool database_ctype_is_c = false; + /* indicates whether locale information cache is valid */ static bool CurrentLocaleConvValid = false; static bool CurrentLCTimeValid = false; |