Documenting coding style - Mailing list pgsql-hackers

From Andres Freund
Subject Documenting coding style
Date
Msg-id C33D942E-8D36-4CAD-8A65-58473CBF8F3C@anarazel.de
Whole thread Raw
In response to Re: pg_waldump: support decoding of WAL inside tarfile  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Documenting coding style
Re: Documenting coding style
List pgsql-hackers
Hi,

On April 10, 2026 3:57:56 AM EDT, Thomas Munro <thomas.munro@gmail.com> wrote:
>Nitpicking code review for commit b15c1513:
>
>+read_archive_wal_page(XLogDumpPrivate *privateInfo, XLogRecPtr targetPagePtr,
>+                     Size count, char *readBuff)
>
>I thought we agreed to stop using Size for new code?  size_t has been
>around since C89.

We really need to start documenting some of this stuff somewhere. Deciding something a few years ago, deep in a thread,
won'tactually help anyone but the participants (and maybe not even them) to know about it.  

I wonder if we should move the coding style section out of sgml into a top-level CODING_STYLE.md or something like
that.

And then obviously add things like Size being deprecated.

Greetings,

Andres


--
Sent from my Android device with K-9 Mail. Please excuse my brevity.



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Use proc_exit() in WalRcvWaitForStartPosition
Next
From: Richard Guo
Date:
Subject: Re: pg17: XX000: no relation entry for relid 0