diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/float4-exp-three-digits.out | 22 | ||||
| -rw-r--r-- | src/test/regress/expected/float4.out | 22 | ||||
| -rw-r--r-- | src/test/regress/expected/float8-exp-three-digits-win32.out | 12 | ||||
| -rw-r--r-- | src/test/regress/expected/float8-small-is-zero.out | 12 | ||||
| -rw-r--r-- | src/test/regress/expected/float8-small-is-zero_1.out | 12 | ||||
| -rw-r--r-- | src/test/regress/expected/float8.out | 12 | ||||
| -rw-r--r-- | src/test/regress/sql/float4.sql | 8 |
7 files changed, 62 insertions, 38 deletions
diff --git a/src/test/regress/expected/float4-exp-three-digits.out b/src/test/regress/expected/float4-exp-three-digits.out index a696a6d1c5..fd8d0b319e 100644 --- a/src/test/regress/expected/float4-exp-three-digits.out +++ b/src/test/regress/expected/float4-exp-three-digits.out @@ -8,14 +8,14 @@ INSERT INTO FLOAT4_TBL(f1) VALUES (' -34.84 '); INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e+20'); INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e-20'); -- test for over and under flow -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e40'); -ERROR: type "real" value out of range: overflow -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e40'); -ERROR: type "real" value out of range: overflow -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-40'); -ERROR: type "real" value out of range: underflow -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-40'); -ERROR: type "real" value out of range: underflow +INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'); +ERROR: value out of range: overflow +INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'); +ERROR: value out of range: overflow +INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'); +ERROR: value out of range: underflow +INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'); +ERROR: value out of range: underflow -- bad input INSERT INTO FLOAT4_TBL(f1) VALUES (''); ERROR: invalid input syntax for type real: "" @@ -72,7 +72,11 @@ ERROR: invalid input syntax for type real: "NaN x" SELECT ' INFINITY x'::float4; ERROR: invalid input syntax for type real: " INFINITY x" SELECT 'Infinity'::float4 + 100.0; -ERROR: type "double precision" value out of range: overflow + ?column? +---------- + Infinity +(1 row) + SELECT 'Infinity'::float4 / 'Infinity'::float4; ?column? ---------- diff --git a/src/test/regress/expected/float4.out b/src/test/regress/expected/float4.out index b94816eaeb..b3bc431a15 100644 --- a/src/test/regress/expected/float4.out +++ b/src/test/regress/expected/float4.out @@ -8,14 +8,14 @@ INSERT INTO FLOAT4_TBL(f1) VALUES (' -34.84 '); INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e+20'); INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e-20'); -- test for over and under flow -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e40'); -ERROR: type "real" value out of range: overflow -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e40'); -ERROR: type "real" value out of range: overflow -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-40'); -ERROR: type "real" value out of range: underflow -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-40'); -ERROR: type "real" value out of range: underflow +INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'); +ERROR: value out of range: overflow +INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'); +ERROR: value out of range: overflow +INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'); +ERROR: value out of range: underflow +INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'); +ERROR: value out of range: underflow -- bad input INSERT INTO FLOAT4_TBL(f1) VALUES (''); ERROR: invalid input syntax for type real: "" @@ -72,7 +72,11 @@ ERROR: invalid input syntax for type real: "NaN x" SELECT ' INFINITY x'::float4; ERROR: invalid input syntax for type real: " INFINITY x" SELECT 'Infinity'::float4 + 100.0; -ERROR: type "double precision" value out of range: overflow + ?column? +---------- + Infinity +(1 row) + SELECT 'Infinity'::float4 / 'Infinity'::float4; ?column? ---------- 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; diff --git a/src/test/regress/expected/float8-small-is-zero.out b/src/test/regress/expected/float8-small-is-zero.out index 71d9168950..83a78b2994 100644 --- a/src/test/regress/expected/float8-small-is-zero.out +++ b/src/test/regress/expected/float8-small-is-zero.out @@ -80,7 +80,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? ---------- @@ -350,15 +354,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; diff --git a/src/test/regress/expected/float8-small-is-zero_1.out b/src/test/regress/expected/float8-small-is-zero_1.out index 87db7d3d59..563b1a70b9 100644 --- a/src/test/regress/expected/float8-small-is-zero_1.out +++ b/src/test/regress/expected/float8-small-is-zero_1.out @@ -80,7 +80,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? ---------- @@ -350,15 +354,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; diff --git a/src/test/regress/expected/float8.out b/src/test/regress/expected/float8.out index 8f5b32eac0..38d2cbfb41 100644 --- a/src/test/regress/expected/float8.out +++ b/src/test/regress/expected/float8.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; diff --git a/src/test/regress/sql/float4.sql b/src/test/regress/sql/float4.sql index a2140f547e..5944e2fc14 100644 --- a/src/test/regress/sql/float4.sql +++ b/src/test/regress/sql/float4.sql @@ -11,10 +11,10 @@ INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e+20'); INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e-20'); -- test for over and under flow -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e40'); -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e40'); -INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-40'); -INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-40'); +INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'); +INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'); +INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'); +INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'); -- bad input INSERT INTO FLOAT4_TBL(f1) VALUES (''); |
