Skip to content

Commit fe2bf8f

Browse files
committed
Add some more numeric test coverage
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.
1 parent f481d28 commit fe2bf8f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/test/regress/expected/numeric.out

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,18 @@ SELECT AVG(val) FROM num_data;
10961096
-13430913.592242320700
10971097
(1 row)
10981098

1099+
SELECT MAX(val) FROM num_data;
1100+
max
1101+
--------------------
1102+
7799461.4119000000
1103+
(1 row)
1104+
1105+
SELECT MIN(val) FROM num_data;
1106+
min
1107+
----------------------
1108+
-83028485.0000000000
1109+
(1 row)
1110+
10991111
SELECT STDDEV(val) FROM num_data;
11001112
stddev
11011113
-------------------------------

src/test/regress/sql/numeric.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ SELECT power('-inf'::numeric, '-inf');
752752
-- ******************************
753753
-- numeric AVG used to fail on some platforms
754754
SELECT AVG(val) FROM num_data;
755+
SELECT MAX(val) FROM num_data;
756+
SELECT MIN(val) FROM num_data;
755757
SELECT STDDEV(val) FROM num_data;
756758
SELECT VARIANCE(val) FROM num_data;
757759

0 commit comments

Comments
 (0)