Revert a few small patches that were intended for version 19.
authorJeff Davis <jdavis@postgresql.org>
Wed, 11 Jun 2025 22:03:52 +0000 (15:03 -0700)
committerJeff Davis <jdavis@postgresql.org>
Wed, 11 Jun 2025 22:10:12 +0000 (15:10 -0700)
4c787a24e7e220a60022e47c1776f22f72902899
78bd364ee39ca70a8f9cb8719282389866a08e14
7a6880fadc177873d5663961ec3a02d67e34dcbe
8898082a5d3e94eef073f0e08124137e096e78ef

Suggested-by: Robert Haas <robertmhaas@gmail.com>
Discussion: https://postgr.es/m/CA+TgmoZ=J=PVNZUNKaxULu+KUVSt3Y-aJ1DZ9Y3Co6mu0z62jA@mail.gmail.com
Discussion: https://postgr.es/m/60e8c6d0a6c08e67f15dbbe9e53df0119c710065.camel@j-davis.com

contrib/isn/isn.c
contrib/spi/refint.c
src/backend/commands/copyfromparse.c
src/backend/utils/adt/inet_net_pton.c

index 1880c91844e90c8ef19dda775fefccfbfae46331..038c8ed4db7bddd6f799a50f1fceee64b4100f1b 100644 (file)
@@ -726,7 +726,7 @@ string2ean(const char *str, struct Node *escontext, ean13 *result,
            if (type != INVALID)
                goto eaninvalid;
            type = ISSN;
-           *aux1++ = pg_ascii_toupper((unsigned char) *aux2);
+           *aux1++ = toupper((unsigned char) *aux2);
            length++;
        }
        else if (length == 9 && (digit || *aux2 == 'X' || *aux2 == 'x') && last)
@@ -736,7 +736,7 @@ string2ean(const char *str, struct Node *escontext, ean13 *result,
                goto eaninvalid;
            if (type == INVALID)
                type = ISBN;    /* ISMN must start with 'M' */
-           *aux1++ = pg_ascii_toupper((unsigned char) *aux2);
+           *aux1++ = toupper((unsigned char) *aux2);
            length++;
        }
        else if (length == 11 && digit && last)
index 89898cad7b0d7701a225f3bbb310ccba5f583aa2..d5e25e07ae9e21074a658f5fd8552960c6ecfd9e 100644 (file)
@@ -321,7 +321,7 @@ check_foreign_key(PG_FUNCTION_ARGS)
    if (nrefs < 1)
        /* internal error */
        elog(ERROR, "check_foreign_key: %d (< 1) number of references specified", nrefs);
-   action = pg_ascii_tolower((unsigned char) *(args[1]));
+   action = tolower((unsigned char) *(args[1]));
    if (action != 'r' && action != 'c' && action != 's')
        /* internal error */
        elog(ERROR, "check_foreign_key: invalid action %s", args[1]);
index f52f2477df1292c4a5eea20ea2cd31e64704c535..f5fc346e2013bb2332a7521d203eeb1a0ec2f920 100644 (file)
@@ -1538,7 +1538,7 @@ GetDecimalFromHex(char hex)
    if (isdigit((unsigned char) hex))
        return hex - '0';
    else
-       return pg_ascii_tolower((unsigned char) hex) - 'a' + 10;
+       return tolower((unsigned char) hex) - 'a' + 10;
 }
 
 /*
index 3b0db2a379937b667d67e43f47905a47281352b1..ef2236d9f0430eae68594809f5a6d2e708402991 100644 (file)
@@ -115,7 +115,8 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size)
        src++;                  /* skip x or X. */
        while ((ch = *src++) != '\0' && isxdigit((unsigned char) ch))
        {
-           ch = pg_ascii_tolower((unsigned char) ch);
+           if (isupper((unsigned char) ch))
+               ch = tolower((unsigned char) ch);
            n = strchr(xdigits, ch) - xdigits;
            assert(n >= 0 && n <= 15);
            if (dirty == 0)