git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f481d28)
Add some more numeric test coverage
Wed, 9 Sep 2020 07:58:12 +0000 (09:58 +0200)
Wed, 9 Sep 2020 07:58:12 +0000 (09:58 +0200)
max(numeric) wasn't tested at all, min(numeric) was only used by some
unrelated tests. Add explicit tests with the other numeric aggregate
functions.


diff --git a/src/test/regress/expected/numeric.out b/src/test/regress/expected/numeric.out
index 8546ce901fa78fc9ee7d5d5e08c28cb766347020..86940ec683861f014745cb94932861f1e4e7e489 100644 (file)
--- a/src/test/regress/expected/numeric.out
+++ b/src/test/regress/expected/numeric.out
@@ -1096,6 +1096,18 @@ SELECT AVG(val) FROM num_data;
-13430913.592242320700
(1 row)
+SELECT MAX(val) FROM num_data;
+ max
+--------------------
+ 7799461.4119000000
+(1 row)
+
+SELECT MIN(val) FROM num_data;
+ min
+----------------------
+ -83028485.0000000000
+(1 row)
+
SELECT STDDEV(val) FROM num_data;
stddev
-------------------------------
diff --git a/src/test/regress/sql/numeric.sql b/src/test/regress/sql/numeric.sql
index 416c16722a9ce68e575661eb5a873fcdc414d69a..febb096af23bed5cebf709878649671d8c3ed164 100644 (file)
--- a/src/test/regress/sql/numeric.sql
+++ b/src/test/regress/sql/numeric.sql
@@ -752,6 +752,8 @@ SELECT power('-inf'::numeric, '-inf');
-- ******************************
-- numeric AVG used to fail on some platforms
SELECT AVG(val) FROM num_data;
+SELECT MAX(val) FROM num_data;
+SELECT MIN(val) FROM num_data;
SELECT STDDEV(val) FROM num_data;
SELECT VARIANCE(val) FROM num_data;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /