Re: Remove dependence on integer wrapping - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Remove dependence on integer wrapping
Date
Msg-id Zp7cwd_6NXlHt6Ye@nathan
Whole thread Raw
In response to Re: Remove dependence on integer wrapping  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Remove dependence on integer wrapping
List pgsql-hackers
On Mon, Jul 22, 2024 at 04:36:33PM -0500, Nathan Bossart wrote:
> Okay.  I'll plan on committing v13-0002 in the next couple of days, then.

Actually, I think my concerns about prohibiting more than necessary go away
if we do the subtraction first.  If "upperIndx[i] - lowerIndx[i]"
overflows, we know the array size is too big.  Similarly, if adding one to
that result overflows, we again know the the array size is too big.  This
appears to be how the surrounding code handles this problem (e.g.,
ReadArrayDimensions()).  Thoughts?

-- 
nathan

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Add on_error and log_verbosity options to file_fdw
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] GROUP BY ALL