Re: Fix bogus use of "long" in aset.c - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Fix bogus use of "long" in aset.c
Date
Msg-id aQKmBj2XzR3_hlER@paquier.xyz
Whole thread Raw
In response to Fix bogus use of "long" in aset.c  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On Thu, Oct 30, 2025 at 12:07:08PM +1300, David Rowley wrote:
> It turns out that AllocSetCheck() thinks "long" is a good datatype to
> store the difference between 2 pointers. That's not going to work well
> on 64-bit Windows as long is 32-bit.

Nice find.  Your suggestion of using Size makes sense here, also for
your consistency argument.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Add mode column to pg_stat_progress_vacuum
Next
From: Tom Lane
Date:
Subject: Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()