aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pg_locale.c
diff options
context:
space:
mode:
authorJeff Davis <jdavis@postgresql.org>2023-03-17 11:47:35 -0700
committerJeff Davis <jdavis@postgresql.org>2023-03-17 12:07:47 -0700
commit8b87e92919cd0e8e8ffbae543d996063149c3ccc (patch)
tree4997aa451e36a850e9ba68270ec439af2388953a /src/backend/utils/adt/pg_locale.c
parent2b216da1e55dc125ada193328e87e471d49b0938 (diff)
downloadpostgresql-8b87e92919cd0e8e8ffbae543d996063149c3ccc.tar.gz
postgresql-8b87e92919cd0e8e8ffbae543d996063149c3ccc.zip
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/pg_locale.c')
-rw-r--r--src/backend/utils/adt/pg_locale.c3
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 a0490a75224..3c8fbe63a61 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -99,6 +99,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;