Re: When is int32 not an int32?

2021-09-26 Thread David E. Wheeler
On Sep 26, 2021, at 19:25, Tom Lane wrote: > 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. Thanks for the pointer, Tom. I believe this fixes that particular issue.

Re: When is int32 not an int32?

2021-09-26 Thread Tom Lane
"David E. Wheeler" writes: > On Sep 26, 2021, at 18:31, Tom Lane 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

Re: When is int32 not an int32?

2021-09-26 Thread David E. Wheeler
On Sep 26, 2021, at 18:31, Tom Lane 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.

Re: When is int32 not an int32?

2021-09-26 Thread David Fetter
On Sun, Sep 26, 2021 at 05:32:11PM -0400, David E. Wheeler wrote: > Hell Hackers, long time no email! > > I got a bug report for the semver extension: > > https://github.com/theory/pg-semver/issues/58 > > It claims that a test unexpected passes. That is, Test #31 is expected to > fail,

Re: When is int32 not an int32?

2021-09-26 Thread Tom Lane
"David E. Wheeler" writes: > It claims that a test unexpected passes. That is, Test #31 is expected to > fail, because it intentionally tests a version in which its parts overflow > the int32[3] they’re stored in, with the expectation that one day we can > refactor the type to handle larger

When is int32 not an int32?

2021-09-26 Thread David E. Wheeler
Hell Hackers, long time no email! I got a bug report for the semver extension: https://github.com/theory/pg-semver/issues/58 It claims that a test unexpected passes. That is, Test #31 is expected to fail, because it intentionally tests a version in which its parts overflow the int32[3]