formatting.c cleanup

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: formatting.c cleanup
Date: 2025-10-20 09:50:14
Message-ID: 6dd9d208-a3ed-49b5-b03d-8617261da973@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The file formatting.c contains some hard to read and understand code.
For the attached patch series, I made a few more or less mechanical
passes over it to modernize the code a bit, renamed some symbols to be
clearer, adjusted some types to make things more self-documenting,
removed some redundant code to make some things more compact. I hope
this helps a bit.

Attachment Content-Type Size
v1-0001-formatting.c-cleanup-Remove-dashes-in-comments.patch text/plain 16.2 KB
v1-0002-formatting.c-cleanup-Move-loop-variables-definiti.patch text/plain 5.5 KB
v1-0003-formatting.c-cleanup-Use-size_t-for-string-length.patch text/plain 12.1 KB
v1-0004-formatting.c-cleanup-Add-some-const-char-qualifie.patch text/plain 2.7 KB
v1-0005-formatting.c-cleanup-Use-array-syntax-instead-of-.patch text/plain 1.2 KB
v1-0006-formatting.c-cleanup-Remove-unnecessary-extra-par.patch text/plain 1.1 KB
v1-0007-formatting.c-cleanup-Remove-unnecessary-extra-lin.patch text/plain 5.8 KB
v1-0008-formatting.c-cleanup-Remove-unnecessary-zeroize-m.patch text/plain 2.3 KB
v1-0009-formatting.c-cleanup-Improve-formatting-of-some-s.patch text/plain 2.7 KB
v1-0010-formatting.c-cleanup-Change-TmFromChar.clock-fiel.patch text/plain 2.1 KB
v1-0011-formatting.c-cleanup-Change-several-int-fields-to.patch text/plain 5.4 KB
v1-0012-formatting.c-cleanup-Rename-DCH_S_-to-DCH_SUFFIX_.patch text/plain 21.3 KB
v1-0013-formatting.c-cleanup-Change-fill_str-return-type-.patch text/plain 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2025-10-20 10:03:08 Re: Use CompactAttribute more often, when possible
Previous Message sunil s 2025-10-20 09:41:01 Re: BRIN: Prevent the heapblk overflow during index summarization on very large tables resulting in an infinite loop