diff options
| author | Bruce Momjian <bruce@momjian.us> | 2007-01-02 20:00:50 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2007-01-02 20:00:50 +0000 |
| commit | f9ac414c35ea084ff70c564ab2c32adb06d5296f (patch) | |
| tree | cec15aa55c29cbf431576e87ba2e950e0226549b /src/test/regress/expected/float8-exp-three-digits-win32.out | |
| parent | 0b56be83441c01419fcf82ebe666e968e6f7b246 (diff) | |
| download | postgresql-f9ac414c35ea084ff70c564ab2c32adb06d5296f.tar.gz | |
Fix float4/8 to handle Infinity and Nan consistently, e.g. Infinity is a
valid result from a computation if one of the input values was infinity.
The previous code assumed an operation that returned infinity was an
overflow.
Handle underflow/overflow consistently, and add checks for aggregate
overflow.
Consistently prevent Inf/Nan from being cast to integer data types.
Fix INT_MIN % -1 to prevent overflow.
Update regression results for new error text.
Per report from Roman Kononov.
Diffstat (limited to 'src/test/regress/expected/float8-exp-three-digits-win32.out')
| -rw-r--r-- | src/test/regress/expected/float8-exp-three-digits-win32.out | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/test/regress/expected/float8-exp-three-digits-win32.out b/src/test/regress/expected/float8-exp-three-digits-win32.out index 2bafa4b86c..2aa7996200 100644 --- a/src/test/regress/expected/float8-exp-three-digits-win32.out +++ b/src/test/regress/expected/float8-exp-three-digits-win32.out @@ -72,7 +72,11 @@ ERROR: invalid input syntax for type double precision: "NaN x" SELECT ' INFINITY x'::float8; ERROR: invalid input syntax for type double precision: " INFINITY x" SELECT 'Infinity'::float8 + 100.0; -ERROR: type "double precision" value out of range: overflow + ?column? +---------- + Infinity +(1 row) + SELECT 'Infinity'::float8 / 'Infinity'::float8; ?column? ---------- @@ -342,15 +346,15 @@ UPDATE FLOAT8_TBL SET f1 = FLOAT8_TBL.f1 * '-1' WHERE FLOAT8_TBL.f1 > '0.0'; SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f; -ERROR: type "double precision" value out of range: overflow +ERROR: value out of range: overflow SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; -ERROR: result is out of range +ERROR: value out of range: overflow SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ; ERROR: cannot take logarithm of zero SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ; ERROR: cannot take logarithm of a negative number SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f; -ERROR: result is out of range +ERROR: value out of range: underflow SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f; ERROR: division by zero SELECT '' AS five, * FROM FLOAT8_TBL; |
