pgsql: Tweak the overflow checks in integer division functions to

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Tweak the overflow checks in integer division functions to
Date: 2008-10-05 23:18:37
Message-ID: 20081005231837.9B1967545A4@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Tweak the overflow checks in integer division functions to complain if the
machine produces zero (rather than the more usual minimum-possible-integer)
for the only possible overflow case. This has been seen to occur for at least
some word widths on some hardware, and it's cheap enough to check for
everywhere. Per Peter's analysis of buildfarm reports.

This could be back-patched, but in the absence of any gripes from the field
I doubt it's worth the trouble.

Modified Files:
--------------
pgsql/src/backend/utils/adt:
int.c (r1.82 -> r1.83)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/int.c?r1=1.82&r2=1.83)
int8.c (r1.70 -> r1.71)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/int8.c?r1=1.70&r2=1.71)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-10-06 00:07:28 pgsql: Fix a missed case in int8-exp-three-digits.out, per buildfarm
Previous Message Tom Lane 2008-10-05 22:50:55 pgsql: Improve behavior of WITH RECURSIVE with an untyped literal in the