Clean up code comments for pg_wchar_tbl

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Clean up code comments for pg_wchar_tbl
Date: 2026-10-27 14:33:35
Message-ID: 637d73f4-e088-4ead-b9e6-1ddb4cd4693f@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The documentation for the functions in the fields of pg_wchar_tbl was
spread out all over the place and was missing a lot of detail. I
propose the attached patch that moves the important material into the
definition of the struct and also expands the details a bit, so that all
the important info is in one easy to find place. Some of those details
I gathered and inferred from various places, and some of those used to
be more like "it works this way" where I'm now somewhat elevating it to
"it is supposed to work this way", so maybe that's worth double-checking.

I'm also removing some unnecessary typedefs for those functions, except
where they were used elsewhere to hold local variables. This
indirection made the code documentation harder to follow. And some of
those typedefs had nonsensical names, like *_converter for functions
that didn't do any converting.

(I was looking for example at struct TableAmRoutine in access/tableam.h
for inspiration for a well-commented callback table definition.)

Attachment Content-Type Size
0001-Clean-up-code-comments-for-pg_wchar_tbl.patch text/plain 14.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bohyun Lee 2026-10-27 14:49:14 Re: [PATCH] pg_upgrade: add --initdb option to create the new cluster automatically
Previous Message Greg Burd 2026-10-27 14:32:00 Re: WAL record CRC calculated incorrectly because of underlying buffer modification