summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBruce Momjian1998-09-02 23:37:13 +0000
committerBruce Momjian1998-09-02 23:37:13 +0000
commitbcc15f15e10630b2624a1610d61bedb88e4c4901 (patch)
treea8eaf6f1acde9a00b459ebade1d4391ef5b1458d /src/test
parent58fdae0ddfb802615f20548c5fe863661028ed31 (diff)
> David Hartwig wrote:
> > Please apply this HAVING regression patch. > > My bad. It is caused by a known bug having to do with GROUP BY. It ain't$ > > nothing to do with HAVING. For some reason the bug went away for a while, $ > > script. It must have, because that is how I created the expected file. :( > > > > A patch to the regression will be forthcoming. >
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/select_having.out12
-rw-r--r--src/test/regress/sql/select_having.sql4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/test/regress/expected/select_having.out b/src/test/regress/expected/select_having.out
index f9188a08fb9..37a5a442f7d 100644
--- a/src/test/regress/expected/select_having.out
+++ b/src/test/regress/expected/select_having.out
@@ -9,12 +9,12 @@ QUERY: INSERT INTO test_having VALUES (6, 4, 'cccc', 'g');
QUERY: INSERT INTO test_having VALUES (7, 4, 'cccc', 'h');
QUERY: INSERT INTO test_having VALUES (8, 4, 'CCCC', 'I');
QUERY: INSERT INTO test_having VALUES (9, 4, 'CCCC', 'j');
-QUERY: SELECT max(a) FROM test_having
- GROUP BY lower(c) HAVING count(*) > 2 OR min(b) = 3;
-max
----
- 5
- 9
+QUERY: SELECT b, c FROM test_having
+ GROUP BY b, c HAVING count(*) = 1;
+b|c
+-+--------
+1|XXXX
+3|bbbb
(2 rows)
QUERY: SELECT lower(c), count(c) FROM test_having
diff --git a/src/test/regress/sql/select_having.sql b/src/test/regress/sql/select_having.sql
index cbb256e1da3..95cff8501b7 100644
--- a/src/test/regress/sql/select_having.sql
+++ b/src/test/regress/sql/select_having.sql
@@ -15,8 +15,8 @@ INSERT INTO test_having VALUES (7, 4, 'cccc', 'h');
INSERT INTO test_having VALUES (8, 4, 'CCCC', 'I');
INSERT INTO test_having VALUES (9, 4, 'CCCC', 'j');
-SELECT max(a) FROM test_having
- GROUP BY lower(c) HAVING count(*) > 2 OR min(b) = 3;
+SELECT b, c FROM test_having
+ GROUP BY b, c HAVING count(*) = 1;
SELECT lower(c), count(c) FROM test_having
GROUP BY lower(c) HAVING count(*) > 2 OR min(a) = max(a);