Re: float8 regression test failure in head - Mailing list pgsql-hackers
From | Neil Conway |
---|---|
Subject | Re: float8 regression test failure in head |
Date | |
Msg-id | 405FB71A.2090006@samurai.com Whole thread Raw |
In response to | Re: float8 regression test failure in head (Christopher Kings-Lynne <chriskl@familyhealth.com.au>) |
Responses |
Re: float8 regression test failure in head
Re: float8 regression test failure in head Re: float8 regression test failure in head |
List | pgsql-hackers |
Christopher Kings-Lynne wrote: > This has not yet been fixed... Attached is a patch for this issue. I've checked with Chris, and this patch allows the regression tests to pass on his machine. I also updated float8-exp-three-digits expected file, but I wasn't able to test these changes (I don't have access to a QNX machine). I intend to apply this patch tomorrow. Cheers, Neil Index: src/test/regress/expected/float8-exp-three-digits-win32.out =================================================================== RCS file: /var/lib/cvs/pgsql-server/src/test/regress/expected/float8-exp-three-digits-win32.out,v retrieving revision 1.2 diff -c -r1.2 float8-exp-three-digits-win32.out *** a/src/test/regress/expected/float8-exp-three-digits-win32.out 15 Mar 2004 16:20:52 -0000 1.2 --- b/src/test/regress/expected/float8-exp-three-digits-win32.out 23 Mar 2004 03:13:54 -0000 *************** *** 7,20 **** INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); ! -- test for underflow and overflow ! INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400'); ERROR: "10e400" is out of range for type double precision ! INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400'); ERROR: "-10e400" is out of range for type double precision ! INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400'); ERROR: "10e-400" is out of range for type double precision ! INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400'); ERROR: "-10e-400" is out of range for type double precision -- bad input INSERT INTO FLOAT8_TBL(f1) VALUES (' '); --- 7,20 ---- INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); ! -- test for underflow and overflow handling ! SELECT '10e400'::float8; ERROR: "10e400" is out of range for type double precision ! SELECT '-10e400'::float8; ERROR: "-10e400" is out of range for type double precision ! SELECT '10e-400'::float8; ERROR: "10e-400" is out of range for type double precision ! SELECT '-10e-400'::float8; ERROR: "-10e-400" is out of range for type double precision -- bad input INSERT INTO FLOAT8_TBL(f1) VALUES (' '); Index: src/test/regress/expected/float8-exp-three-digits.out =================================================================== RCS file: /var/lib/cvs/pgsql-server/src/test/regress/expected/float8-exp-three-digits.out,v retrieving revision 1.7 diff -c -r1.7 float8-exp-three-digits.out *** a/src/test/regress/expected/float8-exp-three-digits.out 25 Sep 2003 16:16:34 -0000 1.7 --- b/src/test/regress/expected/float8-exp-three-digits.out 23 Mar 2004 03:20:50 -0000 *************** *** 2,12 **** -- FLOAT8 -- CREATE TABLE FLOAT8_TBL(f1 float8); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0'); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30'); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); SELECT '' AS five, FLOAT8_TBL.*; five | f1 ------+---------------------- --- 2,87 ---- -- FLOAT8 -- CREATE TABLE FLOAT8_TBL(f1 float8); ! INSERT INTO FLOAT8_TBL(f1) VALUES (' 0.0 '); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30 '); ! INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); + -- test for underflow and overflow handling + SELECT '10e400'::float8; + ERROR: "10e400" is out of range for type double precision + SELECT '-10e400'::float8; + ERROR: "-10e400" is out of range for type double precision + SELECT '10e-400'::float8; + ERROR: "10e-400" is out of range for type double precision + SELECT '-10e-400'::float8; + ERROR: "-10e-400" is out of range for type double precision + -- bad input + INSERT INTO FLOAT8_TBL(f1) VALUES (' '); + ERROR: invalid input syntax for type double precision: " " + INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz'); + ERROR: invalid input syntax for type double precision: "xyz" + INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0'); + ERROR: invalid input syntax for type double precision: "5.0.0" + INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0'); + ERROR: invalid input syntax for type double precision: "5 . 0" + INSERT INTO FLOAT8_TBL(f1) VALUES ('5. 0'); + ERROR: invalid input syntax for type double precision: "5. 0" + INSERT INTO FLOAT8_TBL(f1) VALUES (' - 3'); + ERROR: invalid input syntax for type double precision: " - 3" + INSERT INTO FLOAT8_TBL(f1) VALUES ('123 5'); + ERROR: invalid input syntax for type double precision: "123 5" + -- special inputs + SELECT 'NaN'::float8; + float8 + -------- + NaN + (1 row) + SELECT 'nan'::float8; + float8 + -------- + NaN + (1 row) + + SELECT ' NAN '::float8; + float8 + -------- + NaN + (1 row) + + SELECT 'infinity'::float8; + float8 + ---------- + Infinity + (1 row) + + SELECT ' -INFINiTY '::float8; + float8 + ----------- + -Infinity + (1 row) + + -- bad special inputs + SELECT 'N A N'::float8; + ERROR: invalid input syntax for type double precision: "N A N" + SELECT 'NaN x'::float8; + 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 + SELECT 'Infinity'::float8 / 'Infinity'::float8; + ?column? + ---------- + NaN + (1 row) + + SELECT 'nan'::float8 / 'nan'::float8; + ?column? + ---------- + NaN + (1 row) + SELECT '' AS five, FLOAT8_TBL.*; five | f1 ------+---------------------- Index: src/test/regress/expected/float8-small-is-zero.out =================================================================== RCS file: /var/lib/cvs/pgsql-server/src/test/regress/expected/float8-small-is-zero.out,v retrieving revision 1.5 diff -c -r1.5 float8-small-is-zero.out *** a/src/test/regress/expected/float8-small-is-zero.out 25 Sep 2003 16:16:34 -0000 1.5 --- b/src/test/regress/expected/float8-small-is-zero.out 23 Mar 2004 03:36:37 -0000 *************** *** 2,12 **** -- FLOAT8 -- CREATE TABLE FLOAT8_TBL(f1 float8); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('0.0'); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30'); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('-34.84'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); SELECT '' AS five, FLOAT8_TBL.*; five | f1 ------+---------------------- --- 2,96 ---- -- FLOAT8 -- CREATE TABLE FLOAT8_TBL(f1 float8); ! INSERT INTO FLOAT8_TBL(f1) VALUES (' 0.0 '); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('1004.30 '); ! INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); + -- test for underflow and overflow handling + SELECT '10e400'::float8; + ERROR: "10e400" is out of range for type double precision + SELECT '-10e400'::float8; + ERROR: "-10e400" is out of range for type double precision + SELECT '10e-400'::float8; + float8 + -------- + 0 + (1 row) + + SELECT '-10e-400'::float8; + float8 + -------- + -0 + (1 row) + + -- bad input + INSERT INTO FLOAT8_TBL(f1) VALUES (' '); + ERROR: invalid input syntax for type double precision: " " + INSERT INTO FLOAT8_TBL(f1) VALUES ('xyz'); + ERROR: invalid input syntax for type double precision: "xyz" + INSERT INTO FLOAT8_TBL(f1) VALUES ('5.0.0'); + ERROR: invalid input syntax for type double precision: "5.0.0" + INSERT INTO FLOAT8_TBL(f1) VALUES ('5 . 0'); + ERROR: invalid input syntax for type double precision: "5 . 0" + INSERT INTO FLOAT8_TBL(f1) VALUES ('5. 0'); + ERROR: invalid input syntax for type double precision: "5. 0" + INSERT INTO FLOAT8_TBL(f1) VALUES (' - 3'); + ERROR: invalid input syntax for type double precision: " - 3" + INSERT INTO FLOAT8_TBL(f1) VALUES ('123 5'); + ERROR: invalid input syntax for type double precision: "123 5" + -- special inputs + SELECT 'NaN'::float8; + float8 + -------- + NaN + (1 row) + + SELECT 'nan'::float8; + float8 + -------- + NaN + (1 row) + + SELECT ' NAN '::float8; + float8 + -------- + NaN + (1 row) + + SELECT 'infinity'::float8; + float8 + ---------- + Infinity + (1 row) + + SELECT ' -INFINiTY '::float8; + float8 + ----------- + -Infinity + (1 row) + + -- bad special inputs + SELECT 'N A N'::float8; + ERROR: invalid input syntax for type double precision: "N A N" + SELECT 'NaN x'::float8; + 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 + SELECT 'Infinity'::float8 / 'Infinity'::float8; + ?column? + ---------- + NaN + (1 row) + + SELECT 'nan'::float8 / 'nan'::float8; + ?column? + ---------- + NaN + (1 row) + SELECT '' AS five, FLOAT8_TBL.*; five | f1 ------+---------------------- Index: src/test/regress/expected/float8.out =================================================================== RCS file: /var/lib/cvs/pgsql-server/src/test/regress/expected/float8.out,v retrieving revision 1.19 diff -c -r1.19 float8.out *** a/src/test/regress/expected/float8.out 12 Mar 2004 00:25:40 -0000 1.19 --- b/src/test/regress/expected/float8.out 23 Mar 2004 03:12:28 -0000 *************** *** 7,20 **** INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); ! -- test for underflow and overflow ! INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400'); ERROR: "10e400" is out of range for type double precision ! INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400'); ERROR: "-10e400" is out of range for type double precision ! INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400'); ERROR: "10e-400" is out of range for type double precision ! INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400'); ERROR: "-10e-400" is out of range for type double precision -- bad input INSERT INTO FLOAT8_TBL(f1) VALUES (' '); --- 7,20 ---- INSERT INTO FLOAT8_TBL(f1) VALUES (' -34.84'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); ! -- test for underflow and overflow handling ! SELECT '10e400'::float8; ERROR: "10e400" is out of range for type double precision ! SELECT '-10e400'::float8; ERROR: "-10e400" is out of range for type double precision ! SELECT '10e-400'::float8; ERROR: "10e-400" is out of range for type double precision ! SELECT '-10e-400'::float8; ERROR: "-10e-400" is out of range for type double precision -- bad input INSERT INTO FLOAT8_TBL(f1) VALUES (' '); Index: src/test/regress/sql/float8.sql =================================================================== RCS file: /var/lib/cvs/pgsql-server/src/test/regress/sql/float8.sql,v retrieving revision 1.10 diff -c -r1.10 float8.sql *** a/src/test/regress/sql/float8.sql 12 Mar 2004 00:25:43 -0000 1.10 --- b/src/test/regress/sql/float8.sql 23 Mar 2004 03:08:01 -0000 *************** *** 10,20 **** INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); ! -- test for underflow and overflow ! INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400'); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400'); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400'); ! INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400'); -- bad input INSERT INTO FLOAT8_TBL(f1) VALUES (' '); --- 10,20 ---- INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e+200'); INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200'); ! -- test for underflow and overflow handling ! SELECT '10e400'::float8; ! SELECT '-10e400'::float8; ! SELECT '10e-400'::float8; ! SELECT '-10e-400'::float8; -- bad input INSERT INTO FLOAT8_TBL(f1) VALUES (' ');
pgsql-hackers by date: