"David E. Wheeler" <da...@justatheory.com> writes: > On Sep 26, 2021, at 18:31, Tom Lane <t...@sss.pgh.pa.us> wrote: >> I'd bet more along the lines of "your overflow check is less portable than >> you thought”.
> Oh well now that you mention it and I look past things, I see we’re using > INT_MAX, but should probably use INT32_MAX. More to the point, you should be checking whether strtol reports overflow. Having now seen your code, I'll opine that the failing platforms have 32-bit long. regards, tom lane