Re: Use of "long" in incremental sort code - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Use of "long" in incremental sort code
Date
Msg-id CAH2-WznYKm_KO8NVCoAtPYxx-t9e4ir6R8=uMFxsFn+Hz8fzdA@mail.gmail.com
Whole thread Raw
In response to Re: Use of "long" in incremental sort code  (James Coleman <jtc331@gmail.com>)
Responses Re: Use of "long" in incremental sort code
List pgsql-hackers
On Thu, Jul 2, 2020 at 10:53 AM James Coleman <jtc331@gmail.com> wrote:
> Do you think it's reasonable to use int64 across the board for memory
> and disk space numbers then? If so, I can update the patch.

Using int64 as a replacement for long is the safest general strategy,
and so ISTM that it might be worth doing that even in cases where it
isn't clearly necessary. After all, any code that uses long must have
been written with the assumption that that was the same thing as
int64, at least on most platforms.

There is nothing wrong with using Size/size_t, and doing so is often
slightly clearer. But it's no drop-in replacement for long.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: pg_read_file() with virtual files returns empty string
Next
From: Mitar
Date:
Subject: Persist MVCC forever - retain history