| From: | jinbinge <jinbinge(at)126(dot)com> |
|---|---|
| To: | "Michael Paquier" <michael(at)paquier(dot)xyz> |
| Cc: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pg_resetwal.c: duplicate '0' in hex character set for -l option validation |
| Date: | 2026-03-02 03:38:30 |
| Message-ID: | 5740d869.304c.19caca04600.Coremail.jinbinge@126.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
At 2026-03-02 10:24:52, "Michael Paquier" <michael(at)paquier(dot)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 | Content-Type | Size |
|---|---|---|
| v2-0001-Standardize-hex-digit-character-strings.patch | application/octet-stream | 1.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-03-02 03:44:12 | Re: Patch: Add tsmatch JSONPath operator for granular Full Text Search |
| Previous Message | Michael Paquier | 2026-03-02 03:18:17 | Re: [BUGFIX] Fix crash due to sizeof bug in RegisterExtensionExplainOption |