Joseph Koshakow <kosh...@gmail.com> writes: > On Tue, Feb 13, 2024 at 1:46 PM Tom Lane <t...@sss.pgh.pa.us> wrote: >> (We'd need ereport in back branches, but this problem seems to >> me to probably not be worth back-patching.)
> Agreed, this seems like a pretty rare overflow/underflow. OK, pushed to HEAD only. I converted the second steps to be like "a -= a%b" instead of "a = (a/b)*b" to make it a little clearer that they don't have their own risks of overflow. Maybe it's a shade faster that way too, not sure. regards, tom lane