regression_20190827.patch
application/octet-stream
Filename: regression_20190827.patch
Type: application/octet-stream
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/test/regress/expected/float4-misrounded-input.out | 8 | 0 |
| src/test/regress/expected/float4.out | 8 | 0 |
| src/test/regress/expected/numeric.out | 15 | 11 |
| src/test/regress/sql/float4.sql | 5 | 0 |
| src/test/regress/sql/numeric.sql | 3 | 1 |
diff --git a/src/test/regress/expected/float4-misrounded-input.out b/src/test/regress/expected/float4-misrounded-input.out
index d21e1fba1f..6c89af6394 100644
--- a/src/test/regress/expected/float4-misrounded-input.out
+++ b/src/test/regress/expected/float4-misrounded-input.out
@@ -24,6 +24,14 @@ INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
ERROR: "-10e-70" is out of range for type real
LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
^
+INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'::float8);
+ERROR: value out of range: overflow
+INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'::float8);
+ERROR: value out of range: overflow
+INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'::float8);
+ERROR: value out of range: underflow
+INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'::float8);
+ERROR: value out of range: underflow
INSERT INTO FLOAT4_TBL(f1) VALUES ('10e400');
ERROR: "10e400" is out of range for type real
LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e400');
diff --git a/src/test/regress/expected/float4.out b/src/test/regress/expected/float4.out
index 901abb1d27..d6c22c1752 100644
--- a/src/test/regress/expected/float4.out
+++ b/src/test/regress/expected/float4.out
@@ -24,6 +24,14 @@ INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
ERROR: "-10e-70" is out of range for type real
LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
^
+INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'::float8);
+ERROR: value out of range: overflow
+INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'::float8);
+ERROR: value out of range: overflow
+INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'::float8);
+ERROR: value out of range: underflow
+INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'::float8);
+ERROR: value out of range: underflow
INSERT INTO FLOAT4_TBL(f1) VALUES ('10e400');
ERROR: "10e400" is out of range for type real
LINE 1: INSERT INTO FLOAT4_TBL(f1) VALUES ('10e400');
diff --git a/src/test/regress/expected/numeric.out b/src/test/regress/expected/numeric.out
index 1cb3c3bfab..289c930265 100644
--- a/src/test/regress/expected/numeric.out
+++ b/src/test/regress/expected/numeric.out
@@ -1426,6 +1426,8 @@ INSERT INTO num_input_test(n1) VALUES ('555.50');
INSERT INTO num_input_test(n1) VALUES ('-555.50');
INSERT INTO num_input_test(n1) VALUES ('NaN ');
INSERT INTO num_input_test(n1) VALUES (' nan');
+INSERT INTO num_input_test(n1) values('99999999999999999999999999.998');
+INSERT INTO num_input_test(n1) values('99999999999999999999999999.997');
-- bad inputs
INSERT INTO num_input_test(n1) VALUES (' ');
ERROR: invalid input syntax for type numeric: " "
@@ -1459,17 +1461,19 @@ INSERT INTO num_input_test(n1) VALUES (' N aN ');
ERROR: invalid input syntax for type numeric: " N aN "
LINE 1: INSERT INTO num_input_test(n1) VALUES (' N aN ');
^
-SELECT * FROM num_input_test;
- n1
----------
- 123
- 3245874
- -93853
- 555.50
- -555.50
- NaN
- NaN
-(7 rows)
+SELECT * FROM num_input_test ORDER BY n1 DESC;
+ n1
+--------------------------------
+ NaN
+ NaN
+ 99999999999999999999999999.998
+ 99999999999999999999999999.997
+ 3245874
+ 555.50
+ 123
+ -555.50
+ -93853
+(9 rows)
--
-- Test some corner cases for multiplication
diff --git a/src/test/regress/sql/float4.sql b/src/test/regress/sql/float4.sql
index afdb469dc8..393d98fb14 100644
--- a/src/test/regress/sql/float4.sql
+++ b/src/test/regress/sql/float4.sql
@@ -16,6 +16,11 @@ INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70');
INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70');
INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70');
+INSERT INTO FLOAT4_TBL(f1) VALUES ('10e70'::float8);
+INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e70'::float8);
+INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-70'::float8);
+INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-70'::float8);
+
INSERT INTO FLOAT4_TBL(f1) VALUES ('10e400');
INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e400');
INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-400');
diff --git a/src/test/regress/sql/numeric.sql b/src/test/regress/sql/numeric.sql
index a939412359..51895c426b 100644
--- a/src/test/regress/sql/numeric.sql
+++ b/src/test/regress/sql/numeric.sql
@@ -839,6 +839,8 @@ INSERT INTO num_input_test(n1) VALUES ('555.50');
INSERT INTO num_input_test(n1) VALUES ('-555.50');
INSERT INTO num_input_test(n1) VALUES ('NaN ');
INSERT INTO num_input_test(n1) VALUES (' nan');
+INSERT INTO num_input_test(n1) values('99999999999999999999999999.998');
+INSERT INTO num_input_test(n1) values('99999999999999999999999999.997');
-- bad inputs
INSERT INTO num_input_test(n1) VALUES (' ');
@@ -850,7 +852,7 @@ INSERT INTO num_input_test(n1) VALUES ('5. 0 ');
INSERT INTO num_input_test(n1) VALUES ('');
INSERT INTO num_input_test(n1) VALUES (' N aN ');
-SELECT * FROM num_input_test;
+SELECT * FROM num_input_test ORDER BY n1 DESC;
--
-- Test some corner cases for multiplication