Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdfaf9fb

Browse files
committed
Add a regression test case to catch breakage of GROUP BY
and aggregate functions in queries that use inheritance.
1 parentb4210ae commitdfaf9fb

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

‎src/test/regress/input/misc.source

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ SELECT class, c FROM e_star* x WHERE x.c NOTNULL;
100100

101101
SELECT * FROM f_star* x WHERE x.c ISNULL;
102102

103+
-- grouping and aggregation on inherited sets have been busted in the past...
104+
105+
SELECT sum(a) FROM a_star*;
106+
107+
SELECT class, sum(a) FROM a_star* GROUP BY class;
108+
109+
103110
ALTER TABLE f_star RENAME COLUMN f TO ff;
104111

105112
ALTER TABLE e_star* RENAME COLUMN e TO ee;

‎src/test/regress/output/misc.source

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,23 @@ f | | | |((11111111,33333333),(22222222,44444444))
178178
f | | | |
179179
(8 rows)
180180

181+
QUERY: SELECT sum(a) FROM a_star*;
182+
sum
183+
---
184+
355
185+
(1 row)
186+
187+
QUERY: SELECT class, sum(a) FROM a_star* GROUP BY class;
188+
class|sum
189+
-----+---
190+
a | 3
191+
b | 7
192+
c | 11
193+
d | 84
194+
e | 66
195+
f |184
196+
(6 rows)
197+
181198
QUERY: ALTER TABLE f_star RENAME COLUMN f TO ff;
182199
QUERY: ALTER TABLE e_star* RENAME COLUMN e TO ee;
183200
QUERY: ALTER TABLE d_star* RENAME COLUMN d TO dd;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp