Re: Fix bogus use of "long" in aset.c

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-29T23:40:54Z
Lists: 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

Commits

  1. Fix bogus use of "long" in AllocSetCheck()