Re: Some efforts to get rid of "long" in our codebase

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Some efforts to get rid of "long" in our codebase
Date: 2025-11-16 23:37:25
Message-ID: CAApHDvrsorNRa3uq9inG+xDT-f65azLMyR_j6ucs68DoFKFWTA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 10 Nov 2025 at 13:53, David Rowley <dgrowleyml(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2025-11-16 23:54:44 Re: Dead code in ps_status.c
Previous Message Michael Paquier 2025-11-16 23:11:52 Re: pgsql: Drop unnamed portal immediately after execution to completion