Change some callers to use pg_ascii_toupper().

The input is ASCII anyway, so it's better to be clear that it's not
locale-dependent.

Discussion: https://postgr.es/m/450ceb6260cad30d7afdf155d991a9caafee7c0d.camel@j-davis.com
This commit is contained in:
Jeff Davis
2025-12-01 09:24:03 -08:00
parent 2bc7e886fc
commit 99cd8890be
2 changed files with 2 additions and 2 deletions

View File

@@ -479,7 +479,7 @@ pg_split_walfile_name(PG_FUNCTION_ARGS)
/* Capitalize WAL file name. */
for (p = fname_upper; *p; p++)
*p = pg_toupper((unsigned char) *p);
*p = pg_ascii_toupper((unsigned char) *p);
if (!IsXLogFileName(fname_upper))
ereport(ERROR,

View File

@@ -1035,7 +1035,7 @@ cash_words(PG_FUNCTION_ARGS)
appendStringInfoString(&buf, m0 == 1 ? " cent" : " cents");
/* capitalize output */
buf.data[0] = pg_toupper((unsigned char) buf.data[0]);
buf.data[0] = pg_ascii_toupper((unsigned char) buf.data[0]);
/* return as text datum */
res = cstring_to_text_with_len(buf.data, buf.len);