Re: Some efforts to get rid of "long" in our codebase - Mailing list pgsql-hackers

From David Rowley
Subject Re: Some efforts to get rid of "long" in our codebase
Date
Msg-id CAApHDvrsorNRa3uq9inG+xDT-f65azLMyR_j6ucs68DoFKFWTA@mail.gmail.com
Whole thread Raw
In response to Re: Some efforts to get rid of "long" in our codebase  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On Mon, 10 Nov 2025 at 13:53, David Rowley <dgrowleyml@gmail.com> wrote:
> v2-0001 wraps the format string as suggested by Heikki, v3-0001 uses
> unsigned long long as suggested by Peter.
>
> v2-0002 is updated to use size_t instead of Size, per Heikki
>
> Any further opinions or votes on v2-0001 vs v3-0001?

Nobody seems to feel strongly either way, so I looked again and
thought that using uint64 is nicer as the size of the type is
explicit. We do want a 64-bit type here, not something bigger, which
in theory, long long could be. The less readable format, IMO seemed
like an ok trade-off to be explicit about the type's size.

With that, I pushed the CATCACHE_STATS patch. I also pushed the
MemSet/MemSetAligned one too.

Thanks for looking.

David



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Drop unnamed portal immediately after execution to completion
Next
From: Thomas Munro
Date:
Subject: Re: Dead code in ps_status.c