Add a regression test case to catch breakage of GROUP BY
and aggregate functions in queries that use inheritance.
This commit is contained in:
parent
b4210ae0f0
commit
dfaf9fbcb4
@ -100,6 +100,13 @@ SELECT class, c FROM e_star* x WHERE x.c NOTNULL;
|
||||
|
||||
SELECT * FROM f_star* x WHERE x.c ISNULL;
|
||||
|
||||
-- grouping and aggregation on inherited sets have been busted in the past...
|
||||
|
||||
SELECT sum(a) FROM a_star*;
|
||||
|
||||
SELECT class, sum(a) FROM a_star* GROUP BY class;
|
||||
|
||||
|
||||
ALTER TABLE f_star RENAME COLUMN f TO ff;
|
||||
|
||||
ALTER TABLE e_star* RENAME COLUMN e TO ee;
|
||||
|
@ -178,6 +178,23 @@ f | | | |((11111111,33333333),(22222222,44444444))
|
||||
f | | | |
|
||||
(8 rows)
|
||||
|
||||
QUERY: SELECT sum(a) FROM a_star*;
|
||||
sum
|
||||
---
|
||||
355
|
||||
(1 row)
|
||||
|
||||
QUERY: SELECT class, sum(a) FROM a_star* GROUP BY class;
|
||||
class|sum
|
||||
-----+---
|
||||
a | 3
|
||||
b | 7
|
||||
c | 11
|
||||
d | 84
|
||||
e | 66
|
||||
f |184
|
||||
(6 rows)
|
||||
|
||||
QUERY: ALTER TABLE f_star RENAME COLUMN f TO ff;
|
||||
QUERY: ALTER TABLE e_star* RENAME COLUMN e TO ee;
|
||||
QUERY: ALTER TABLE d_star* RENAME COLUMN d TO dd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user