Re: several cases of float and integer mixup

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: several cases of float and integer mixup
Date: 2026-12-03 12:35:33
Message-ID: CALdSSPgOjhferh9G5dKitHg6=a1g7a0eK5vjrs-Vht5tK5aSpg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 3 Dec 2026 at 16:06, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> I have found several cases where a variable or C function argument was
> declared as an integer but should be a floating-point type, or vice
> versa. See attached patches. I think most of these are harmless in
> practice. The one in gistbuild.c is technically a bug, but it's in
> quite rare circumstances and there is no correctness issue, so it's
> probably not worth bothering with backpatching.

Hi!
I checked GIN & GiST patches.

For GIN num tuple counter - remainig GinBuildState.bs_numtuples /
GinBuildShared.indtuples are still double. I think this change makes
these two places inconsistent so maybe leave as-is?

For GiST itupAvgSize becomes in sync with calculatePagesPerBuffer
analogous variable - looks like declaring it as Size is typo.

--
Best regards,
Kirill Reshke

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Sharpe 2026-12-03 12:51:37 Re: several cases of float and integer mixup
Previous Message David Geier 2026-12-03 12:24:00 Re: Optimize MCV stats for sortable types and utilize sorted-order properties