-bash-2.05b$ uname -a
FreeBSD mir.internal 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Mon Sep 22 14:46:18 WST 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/MIR i386
Chris
parallel group (13 tests): text name char varchar oid boolean int2 int8 int4 float4
bit float8 numeric
boolean ... ok
char ... ok
name ... ok
varchar ... ok
text ... ok
int2 ... ok
int4 ... ok
int8 ... ok
oid ... ok
float4 ... ok
float8 ... FAILED
bit ... ok
numeric ... ok
test strings ... ok
test numerology ... ok
parallel group (20 tests): comments lseg time path timetz reltime circle tinterval
box abstime point polygon interval timestamp inet type_sanity date timestamptz
oidjoins opr_sanity
point ... ok
lseg ... ok
box ... ok
path ... ok
polygon ... ok
circle ... ok
date ... ok
time ... ok
timetz ... ok
timestamp ... ok
timestamptz ... ok
interval ... ok
abstime ... ok
reltime ... ok
tinterval ... ok
inet ... ok
comments ... ok
oidjoins ... ok
type_sanity ... ok
opr_sanity ... ok
test geometry ... ok
test horology ... ok
test insert ... ok
test create_function_1 ... ok
test create_type ... ok
test create_table ... ok
test create_function_2 ... ok
test copy ... ok
parallel group (7 tests): create_operator create_aggregate vacuum triggers
create_misc inherit constraints
constraints ... ok
triggers ... ok
create_misc ... ok
create_aggregate ... ok
create_operator ... ok
inherit ... ok
vacuum ... ok
parallel group (2 tests): create_view create_index
create_index ... ok
create_view ... ok
test sanity_check ... ok
test errors ... ok
test select ... ok
parallel group (18 tests): select_distinct_on select_into update random btree_index
namespace select_having select_distinct hash_index aggregates case transactions
select_implicit union subselect arrays portals join
select_into ... ok
select_distinct ... ok
select_distinct_on ... ok
select_implicit ... ok
select_having ... ok
subselect ... ok
union ... ok
case ... ok
join ... ok
aggregates ... ok
transactions ... ok
random ... ok
portals ... ok
arrays ... ok
btree_index ... ok
hash_index ... ok
update ... ok
namespace ... ok
test privileges ... ok
test misc ... ok
parallel group (5 tests): select_views portals_p2 cluster foreign_key rules
select_views ... ok
portals_p2 ... ok
rules ... ok
foreign_key ... ok
cluster ... ok
parallel group (13 tests): limit prepare copy2 domain truncate sequence rangefuncs
temp polymorphism without_oid conversion plpgsql alter_table
limit ... ok
plpgsql ... ok
copy2 ... ok
temp ... ok
domain ... ok
rangefuncs ... ok
prepare ... ok
without_oid ... ok
conversion ... ok
truncate ... ok
alter_table ... ok
sequence ... ok
polymorphism ... ok
test stats ... ok
*** ./expected/float8-small-is-zero.out Fri Sep 26 00:16:34 2003
--- ./results/float8.out Thu Mar 18 11:26:20 2004
***************
*** 7,12 ****
--- 7,86 ----
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');
+ INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
+ -- 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
------+----------------------
***************
*** 15,21 ****
| -34.84
| 1.2345678901234e+200
| 1.2345678901234e-200
! (5 rows)
SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <> '1004.3';
four | f1
--- 89,97 ----
| -34.84
| 1.2345678901234e+200
| 1.2345678901234e-200
! | 0
! | -0
! (7 rows)
SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <> '1004.3';
four | f1
***************
*** 24,30 ****
| -34.84
| 1.2345678901234e+200
| 1.2345678901234e-200
! (4 rows)
SELECT '' AS one, f.* FROM FLOAT8_TBL f WHERE f.f1 = '1004.3';
one | f1
--- 100,108 ----
| -34.84
| 1.2345678901234e+200
| 1.2345678901234e-200
! | 0
! | -0
! (6 rows)
SELECT '' AS one, f.* FROM FLOAT8_TBL f WHERE f.f1 = '1004.3';
one | f1
***************
*** 38,44 ****
| 0
| -34.84
| 1.2345678901234e-200
! (3 rows)
SELECT '' AS three, f.* FROM FLOAT8_TBL f WHERE f.f1 < '1004.3';
three | f1
--- 116,124 ----
| 0
| -34.84
| 1.2345678901234e-200
! | 0
! | -0
! (5 rows)
SELECT '' AS three, f.* FROM FLOAT8_TBL f WHERE f.f1 < '1004.3';
three | f1
***************
*** 46,52 ****
| 0
| -34.84
| 1.2345678901234e-200
! (3 rows)
SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE '1004.3' >= f.f1;
four | f1
--- 126,134 ----
| 0
| -34.84
| 1.2345678901234e-200
! | 0
! | -0
! (5 rows)
SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE '1004.3' >= f.f1;
four | f1
***************
*** 55,61 ****
| 1004.3
| -34.84
| 1.2345678901234e-200
! (4 rows)
SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <= '1004.3';
four | f1
--- 137,145 ----
| 1004.3
| -34.84
| 1.2345678901234e-200
! | 0
! | -0
! (6 rows)
SELECT '' AS four, f.* FROM FLOAT8_TBL f WHERE f.f1 <= '1004.3';
four | f1
***************
*** 64,70 ****
| 1004.3
| -34.84
| 1.2345678901234e-200
! (4 rows)
SELECT '' AS three, f.f1, f.f1 * '-10' AS x
FROM FLOAT8_TBL f
--- 148,156 ----
| 1004.3
| -34.84
| 1.2345678901234e-200
! | 0
! | -0
! (6 rows)
SELECT '' AS three, f.f1, f.f1 * '-10' AS x
FROM FLOAT8_TBL f
***************
*** 123,129 ****
| -34.84 | 34.84
| 1.2345678901234e+200 | 1.2345678901234e+200
| 1.2345678901234e-200 | 1.2345678901234e-200
! (5 rows)
-- truncate
SELECT '' AS five, f.f1, %f.f1 AS trunc_f1
--- 209,217 ----
| -34.84 | 34.84
| 1.2345678901234e+200 | 1.2345678901234e+200
| 1.2345678901234e-200 | 1.2345678901234e-200
! | 0 | 0
! | -0 | 0
! (7 rows)
-- truncate
SELECT '' AS five, f.f1, %f.f1 AS trunc_f1
***************
*** 135,141 ****
| -34.84 | -34
| 1.2345678901234e+200 | 1.2345678901234e+200
| 1.2345678901234e-200 | 0
! (5 rows)
-- round
SELECT '' AS five, f.f1, f.f1 % AS round_f1
--- 223,231 ----
| -34.84 | -34
| 1.2345678901234e+200 | 1.2345678901234e+200
| 1.2345678901234e-200 | 0
! | 0 | 0
! | -0 | -0
! (7 rows)
-- round
SELECT '' AS five, f.f1, f.f1 % AS round_f1
***************
*** 147,153 ****
| -34.84 | -35
| 1.2345678901234e+200 | 1.2345678901234e+200
| 1.2345678901234e-200 | 0
! (5 rows)
-- ceil
select ceil(f1) as ceil_f1 from float8_tbl f;
--- 237,245 ----
| -34.84 | -35
| 1.2345678901234e+200 | 1.2345678901234e+200
| 1.2345678901234e-200 | 0
! | 0 | 0
! | -0 | -0
! (7 rows)
-- ceil
select ceil(f1) as ceil_f1 from float8_tbl f;
***************
*** 158,164 ****
-34
1.2345678901234e+200
1
! (5 rows)
-- floor
select floor(f1) as floor_f1 from float8_tbl f;
--- 250,258 ----
-34
1.2345678901234e+200
1
! 0
! -0
! (7 rows)
-- floor
select floor(f1) as floor_f1 from float8_tbl f;
***************
*** 169,175 ****
-35
1.2345678901234e+200
0
! (5 rows)
-- sign
select sign(f1) as sign_f1 from float8_tbl f;
--- 263,271 ----
-35
1.2345678901234e+200
0
! 0
! -0
! (7 rows)
-- sign
select sign(f1) as sign_f1 from float8_tbl f;
***************
*** 180,186 ****
-1
1
1
! (5 rows)
-- square root
SELECT sqrt(float8 '64') AS eight;
--- 276,284 ----
-1
1
1
! 0
! 0
! (7 rows)
-- square root
SELECT sqrt(float8 '64') AS eight;
***************
*** 231,237 ****
| -34.84 | -3.26607421344208
| 1.2345678901234e+200 | 4.97933859234765e+66
| 1.2345678901234e-200 | 2.3112042409018e-67
! (5 rows)
SELECT '' AS five, FLOAT8_TBL.*;
five | f1
--- 329,337 ----
| -34.84 | -3.26607421344208
| 1.2345678901234e+200 | 4.97933859234765e+66
| 1.2345678901234e-200 | 2.3112042409018e-67
! | 0 | 0
! | -0 | -0
! (7 rows)
SELECT '' AS five, FLOAT8_TBL.*;
five | f1
***************
*** 241,247 ****
| -34.84
| 1.2345678901234e+200
| 1.2345678901234e-200
! (5 rows)
UPDATE FLOAT8_TBL
SET f1 = FLOAT8_TBL.f1 * '-1'
--- 341,349 ----
| -34.84
| 1.2345678901234e+200
| 1.2345678901234e-200
! | 0
! | -0
! (7 rows)
UPDATE FLOAT8_TBL
SET f1 = FLOAT8_TBL.f1 * '-1'
***************
*** 263,272 ****
------+-----------------------
| 0
| -34.84
| -1004.3
| -1.2345678901234e+200
| -1.2345678901234e-200
! (5 rows)
-- test for over- and underflow
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
--- 365,376 ----
------+-----------------------
| 0
| -34.84
+ | 0
+ | -0
| -1004.3
| -1.2345678901234e+200
| -1.2345678901234e-200
! (7 rows)
-- test for over- and underflow
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');======================================================================
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
