summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane2003-03-21 01:58:05 +0000
committerTom Lane2003-03-21 01:58:05 +0000
commitd72f6c75038d8d37e64a29a04b911f728044d83b (patch)
treeeceda56ef435a8b8317d0e123cbdb0fe2cd844e4 /src/test
parent5ae424529b1bb9bf36eddbec57c7ba887698371e (diff)
Reimplement NUMERIC datatype using base-10000 arithmetic; also improve
some of the algorithms for higher functions. I see about a factor of ten speedup on the 'numeric' regression test, but it's unlikely that that test is representative of real-world applications. initdb forced due to change of on-disk representation for NUMERIC.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/aggregates.out18
-rw-r--r--src/test/regress/expected/numeric.out6
2 files changed, 12 insertions, 12 deletions
diff --git a/src/test/regress/expected/aggregates.out b/src/test/regress/expected/aggregates.out
index 5a628755190..9378ce7c9bc 100644
--- a/src/test/regress/expected/aggregates.out
+++ b/src/test/regress/expected/aggregates.out
@@ -2,15 +2,15 @@
-- AGGREGATES
--
SELECT avg(four) AS avg_1 FROM onek;
- avg_1
----------------------
- 1.50000000000000000
+ avg_1
+--------------------
+ 1.5000000000000000
(1 row)
SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100;
- avg_32
---------------------
- 32.666666666666667
+ avg_32
+---------------------
+ 32.6666666666666667
(1 row)
-- In 7.1, avg(float4) is computed using float8 arithmetic.
@@ -120,9 +120,9 @@ group by ten order by ten;
(10 rows)
SELECT newavg(four) AS avg_1 FROM onek;
- avg_1
----------------------
- 1.50000000000000000
+ avg_1
+--------------------
+ 1.5000000000000000
(1 row)
SELECT newsum(four) AS sum_1500 FROM onek;
diff --git a/src/test/regress/expected/numeric.out b/src/test/regress/expected/numeric.out
index d1797df4903..50730edcf8f 100644
--- a/src/test/regress/expected/numeric.out
+++ b/src/test/regress/expected/numeric.out
@@ -665,9 +665,9 @@ SELECT t1.id1, t1.result, t2.expected
-- ******************************
-- numeric AVG used to fail on some platforms
SELECT AVG(val) FROM num_data;
- avg
-----------------------
- -13430913.5922423207
+ avg
+------------------------
+ -13430913.592242320700
(1 row)
-- Check for appropriate rounding and overflow