> On 25 Aug 2026, at 14:18, Dagfinn Ilmari MannsÃ¥ker <[email protected]> wrote:
> 
> Instead of open-coding this, how about about using pg_neg_s32_overflow?
> 
> if (pg_neg_s32_overflow(n, &n))
> n = PG_INT32_MAX;

Yes, that's indeed a good idea.

--
Daniel Gustafsson



Reply via email to