aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/regress/expected/float4-misrounded-input.out8
-rw-r--r--src/test/regress/expected/float4.out8
-rw-r--r--src/test/regress/sql/float4.sql5
3 files changed, 21 insertions, 0 deletions
diff --git a/src/test/regress/expected/float4-misrounded-input.out b/src/test/regress/expected/float4-misrounded-input.out
index d21e1fba1f5..6c89af6394f 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 901abb1d27a..d6c22c1752a 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/sql/float4.sql b/src/test/regress/sql/float4.sql
index afdb469dc82..393d98fb143 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');