From 4171bb869f234281a13bb862d3b1e577bf336242 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 4 Oct 2004 14:42:48 +0000 Subject: 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. --- src/backend/utils/adt/numutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/numutils.c') diff --git a/src/backend/utils/adt/numutils.c b/src/backend/utils/adt/numutils.c index 100f38d593f..a4d18417c22 100644 --- a/src/backend/utils/adt/numutils.c +++ b/src/backend/utils/adt/numutils.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/numutils.c,v 1.65 2004/08/29 05:06:49 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/numutils.c,v 1.66 2004/10/04 14:42:46 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -114,7 +114,7 @@ pg_atoi(char *s, int size, int c) if (errno == ERANGE || l < SHRT_MIN || l > SHRT_MAX) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("value \"%s\" is out of range for type shortint", s))); + errmsg("value \"%s\" is out of range for type smallint", s))); break; case sizeof(int8): if (errno == ERANGE || l < SCHAR_MIN || l > SCHAR_MAX) -- cgit v1.2.3