Re: Multiple grouping set specs referencing duplicate alias

2022-10-23 Thread Tom Lane
David Kimura writes: > I think I may have stumbled across a case of wrong results on HEAD (same > through version 9.6, though interestingly 9.5 produces different results > altogether). > test=# SELECT i AS ai1, i AS ai2 FROM generate_series(1,3)i GROUP BY > ai2, ROLLUP(ai1) ORDER BY ai1, ai2; Y

Multiple grouping set specs referencing duplicate alias

2022-10-21 Thread David Kimura
Hi all! I think I may have stumbled across a case of wrong results on HEAD (same through version 9.6, though interestingly 9.5 produces different results altogether). test=# SELECT i AS ai1, i AS ai2 FROM generate_series(1,3)i GROUP BY ai2, ROLLUP(ai1) ORDER BY ai1, ai2; ai1 | ai2 -+-