Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
533d0915
Commit
533d0915
authored
Mar 24, 2004
by
Neil Conway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the float8 regression tests: they should now pass on FreeBSD 4.x
and (in theory) QNX. Thanks to Chris KL for the report.
parent
1c4da387
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
180 additions
and
21 deletions
+180
-21
src/test/regress/expected/float8-exp-three-digits-win32.out
src/test/regress/expected/float8-exp-three-digits-win32.out
+5
-5
src/test/regress/expected/float8-exp-three-digits.out
src/test/regress/expected/float8-exp-three-digits.out
+78
-3
src/test/regress/expected/float8-small-is-zero.out
src/test/regress/expected/float8-small-is-zero.out
+87
-3
src/test/regress/expected/float8.out
src/test/regress/expected/float8.out
+5
-5
src/test/regress/sql/float8.sql
src/test/regress/sql/float8.sql
+5
-5
No files found.
src/test/regress/expected/float8-exp-three-digits-win32.out
View file @
533d0915
...
...
@@ -7,14 +7,14 @@ 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
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400')
;
-- test for underflow and overflow
handling
SELECT '10e400'::float8
;
ERROR: "10e400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400')
;
SELECT '-10e400'::float8
;
ERROR: "-10e400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400')
;
SELECT '10e-400'::float8
;
ERROR: "10e-400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400')
;
SELECT '-10e-400'::float8
;
ERROR: "-10e-400" is out of range for type double precision
-- bad input
INSERT INTO FLOAT8_TBL(f1) VALUES (' ');
...
...
src/test/regress/expected/float8-exp-three-digits.out
View file @
533d0915
...
...
@@ -2,11 +2,86 @@
-- 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 ('
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
------+----------------------
...
...
src/test/regress/expected/float8-small-is-zero.out
View file @
533d0915
...
...
@@ -2,11 +2,95 @@
-- 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 ('
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
------+----------------------
...
...
src/test/regress/expected/float8.out
View file @
533d0915
...
...
@@ -7,14 +7,14 @@ 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
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400')
;
-- test for underflow and overflow
handling
SELECT '10e400'::float8
;
ERROR: "10e400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400')
;
SELECT '-10e400'::float8
;
ERROR: "-10e400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400')
;
SELECT '10e-400'::float8
;
ERROR: "10e-400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400')
;
SELECT '-10e-400'::float8
;
ERROR: "-10e-400" is out of range for type double precision
-- bad input
INSERT INTO FLOAT8_TBL(f1) VALUES (' ');
...
...
src/test/regress/sql/float8.sql
View file @
533d0915
...
...
@@ -10,11 +10,11 @@ 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'
)
;
INSERT
INTO
FLOAT8_TBL
(
f1
)
VALUES
(
'-10e400'
)
;
INSERT
INTO
FLOAT8_TBL
(
f1
)
VALUES
(
'10e-400'
)
;
INSERT
INTO
FLOAT8_TBL
(
f1
)
VALUES
(
'-10e-400'
)
;
-- 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
(
' '
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment