Detect overflow in integer arithmetic operators (integer, smallint, and
Tom Lane <tgl@sss.pgh.pa.us>
Detect overflow in integer arithmetic operators (integer, smallint, and bigint variants). Clean up some inconsistencies in error message wording. Fix scanint8 to allow trailing whitespace in INT64_MIN case. Update int8-exp-three-digits.out, which seems to have been ignored by the last couple of people to modify the int8 regression test, and remove int8-exp-three-digits-win32.out which is thereby exposed as redundant.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/release.sgml | modified | +14 −1 |
| src/backend/utils/adt/float.c | modified | +3 −3 |
| src/backend/utils/adt/int8.c | modified | +275 −105 |
| src/backend/utils/adt/int.c | modified | +257 −26 |
| src/backend/utils/adt/numeric.c | modified | +6 −6 |
| src/backend/utils/adt/numutils.c | modified | +2 −2 |
| src/backend/utils/adt/varbit.c | modified | +2 −2 |
| src/test/regress/expected/int2.out | modified | +24 −19 |
| src/test/regress/expected/int4.out | modified | +46 −36 |
| src/test/regress/expected/int8-exp-three-digits.out | modified | +31 −14 |
| src/test/regress/expected/int8-exp-three-digits-win32.out | deleted | +0 −300 |
| src/test/regress/expected/int8.out | modified | +9 −7 |
| src/test/regress/expected/subselect.out | modified | +2 −1 |
| src/test/regress/resultmap | modified | +1 −1 |
| src/test/regress/sql/int2.sql | modified | +9 −0 |
| src/test/regress/sql/int4.sql | modified | +18 −0 |
| src/test/regress/sql/int8.sql | modified | +1 −0 |
| src/test/regress/sql/subselect.sql | modified | +2 −1 |