diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-10-04 14:42:48 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-10-04 14:42:48 +0000 |
commit | 4171bb869f234281a13bb862d3b1e577bf336242 (patch) | |
tree | e8193f7be04ddd942f13811ef9bbe0494d24920d /src/backend/utils/adt/numutils.c | |
parent | 24201b4bc60e46e8de031fb5911af32bdb412d43 (diff) | |
download | postgresql-4171bb869f234281a13bb862d3b1e577bf336242.tar.gz postgresql-4171bb869f234281a13bb862d3b1e577bf336242.zip |
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.
Diffstat (limited to 'src/backend/utils/adt/numutils.c')
-rw-r--r-- | src/backend/utils/adt/numutils.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) |