v1-0001-copyfromparse.c-use-pg_ascii_tolower-rather-than-.patch

text/x-patch

Filename: v1-0001-copyfromparse.c-use-pg_ascii_tolower-rather-than-.patch
Type: text/x-patch
Part: 0
Message: Re: Remaining dependency on setlocale()

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: format-patch
Series: patch v1-0001
Subject: copyfromparse.c: use pg_ascii_tolower() rather than tolower().
File+
src/backend/commands/copyfromparse.c 1 1
From 21f5cc0bca48ef8d2fdc746385e3afda575fbd9e Mon Sep 17 00:00:00 2001
From: Jeff Davis <jeff@j-davis.com>
Date: Fri, 6 Jun 2025 09:50:53 -0700
Subject: [PATCH v1 1/8] copyfromparse.c: use pg_ascii_tolower() rather than
 tolower().

---
 src/backend/commands/copyfromparse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/commands/copyfromparse.c b/src/backend/commands/copyfromparse.c
index f5fc346e201..f52f2477df1 100644
--- a/src/backend/commands/copyfromparse.c
+++ b/src/backend/commands/copyfromparse.c
@@ -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;
 }
 
 /*
-- 
2.43.0