From: movead.li@highgo.ca <movead.li@highgo.ca>
To: Michael Paquier <michael@paquier.xyz>
Cc: ibrar.ahmad <ibrar.ahmad@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: Re: Email to hackers for test coverage
Date: Mon, 26 Aug 2019 17:10:59 +0800
Message-ID: <2019082617105744807310@highgo.ca> (raw)
References: <20190822174636998766188@highgo.ca>
<CALtqXTfnXR5EnxNdg4eCSQwD36PVHfKeNFNZ=N_MqNNyKyZEQw@mail.gmail.com>
<201908242323292669324@highgo.ca>
<20190826044840.GD7005@paquier.xyz>
On Mon, 26 Aug 2019 12:48:40 +0800 michael@paquier.xyz wrote
>Your patch has forgotten to update the alternate output in
>float4-misrounded-input.out.
Thanks for your remind, I have modified the patch and now it is
'regression_20190826.patch' in attachment, and I have done a successful
test on Cygwin.
--
Movead
Attachments:regression_20190826.patch (application/octet-stream, 4.4K) downloaddiff --git a/src/test/regress/expected/float4-misrounded-input.out b/src/test/regress/expected/float4-misrounded-input.outindex d21e1fba1f..150692a812 100644--- a/src/test/regress/expected/float4-misrounded-input.out+++ b/src/test/regress/expected/float4-misrounded-input.out@@ -939,3 +939,8 @@ drop cascades to cast from xfloat4 to real
drop cascades to cast from real to xfloat4
drop cascades to cast from xfloat4 to integer
drop cascades to cast from integer to xfloat4
+-- Add test case for float4() type fonversion function+select float4(1234567890123456789012345678901234567890::float8);+ERROR: value out of range: overflow+select float4(0.0000000000000000000000000000000000000000000001::float8);+ERROR: value out of range: underflowdiff --git a/src/test/regress/expected/float4.out b/src/test/regress/expected/float4.outindex 901abb1d27..0f0dbe0689 100644--- a/src/test/regress/expected/float4.out+++ b/src/test/regress/expected/float4.out@@ -939,3 +939,8 @@ drop cascades to cast from xfloat4 to real
drop cascades to cast from real to xfloat4
drop cascades to cast from xfloat4 to integer
drop cascades to cast from integer to xfloat4
+-- Add test case for float4() type fonversion function+select float4(1234567890123456789012345678901234567890::float8);+ERROR: value out of range: overflow+select float4(0.0000000000000000000000000000000000000000000001::float8);+ERROR: value out of range: underflowdiff --git a/src/test/regress/expected/numeric.out b/src/test/regress/expected/numeric.outindex 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.sqlindex afdb469dc8..fecc0a7d17 100644--- a/src/test/regress/sql/float4.sql+++ b/src/test/regress/sql/float4.sql@@ -345,3 +345,7 @@ select float4send(flt) as ibits,
-- clean up, lest opr_sanity complain
drop type xfloat4 cascade;
++-- Add test case for float4() type fonversion function+select float4(1234567890123456789012345678901234567890::float8);+select float4(0.0000000000000000000000000000000000000000000001::float8);
\ No newline at end of file
diff --git a/src/test/regress/sql/numeric.sql b/src/test/regress/sql/numeric.sqlindex 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: movead.li@highgo.ca, michael@paquier.xyz, ibrar.ahmad@gmail.com
Subject: Re: Email to hackers for test coverage
In-Reply-To: <2019082617105744807310@highgo.ca>
References: <20190822174636998766188@highgo.ca> <CALtqXTfnXR5EnxNdg4eCSQwD36PVHfKeNFNZ=N_MqNNyKyZEQw@mail.gmail.com> <201908242323292669324@highgo.ca> <20190826044840.GD7005@paquier.xyz> <2019082617105744807310@highgo.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox