copyfromparse.c: use pg_ascii_tolower() rather than tolower().
authorJeff Davis
Tue, 10 Jun 2025 18:22:57 +0000 (11:22 -0700)
committerJeff Davis
Tue, 10 Jun 2025 18:22:57 +0000 (11:22 -0700)
Avoid dependence on setlocale(). No behavior change.

Discussion: https://postgr.es/m/9875f7f9-50f1-4b5d-86fc-ee8b03e8c162@eisentraut.org
Reviewed-by: Peter Eisentraut
src/backend/commands/copyfromparse.c

index f5fc346e2013bb2332a7521d203eeb1a0ec2f920..f52f2477df1292c4a5eea20ea2cd31e64704c535 100644 (file)
@@ -1538,7 +1538,7 @@ GetDecimalFromHex(char hex)
    if (isdigit((unsigned char) hex))
        return hex - '0';
    else
-       return tolower((unsigned char) hex) - 'a' + 10;
+       return pg_ascii_tolower((unsigned char) hex) - 'a' + 10;
 }
 
 /*