Re: pg_resetwal.c: duplicate '0' in hex character set for -l option validation - Mailing list pgsql-hackers

From jinbinge
Subject Re: pg_resetwal.c: duplicate '0' in hex character set for -l option validation
Date
Msg-id 5740d869.304c.19caca04600.Coremail.jinbinge@126.com
Whole thread Raw
In response to Re: pg_resetwal.c: duplicate '0' in hex character set for -l option validation  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers


At 2026-03-02 10:24:52, "Michael Paquier" <michael@paquier.xyz> wrote:
>On Mon, Mar 02, 2026 at 10:13:38AM +0800, jinbinge wrote:
>> "0123456789ABCDEFabcdef". This change would be purely cosmetic with
>> no behavioral impact, but would eliminate the unnecessary
>> duplication.
>
>That's entirely cosmetic, well why not..  There is also a
>01234567890ABCDEF in src/bin/pg_upgrade/controldata.c.  Perhaps we
>could sanitize the whole as of 0123456789ABCDEF, which is larger in
>trend compared to 1234567890ABCDEF when it comes to the C code, not
>the tests.
>--
>Michael


Thank you for the feedback. I have also fixed the same redundant hex character string
in src/bin/pg_upgrade/controldata.c.

After searching for "01234567890" and "01234567890ABCDEF" (excluding test files),
no other occurrences were found.
The attached v2 patch replaces non‑standard or redundant hexadecimal digit strings
in C source files with the conventional "0123456789ABCDEF".
--
Jinbinge
Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [BUGFIX] Fix crash due to sizeof bug in RegisterExtensionExplainOption
Next
From: Chao Li
Date:
Subject: Re: Patch: Add tsmatch JSONPath operator for granular Full Text Search