Re: [BUGS] Improper const-evaluation of HAVING with grouping sets andsubquery pullup
От | Heikki Linnakangas |
---|---|
Тема | Re: [BUGS] Improper const-evaluation of HAVING with grouping sets andsubquery pullup |
Дата | |
Msg-id | aefc657e-edb2-64d5-6df1-a0828f6e9104@iki.fi обсуждение исходный текст |
Ответ на | Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup (Andrew Gierth <andrew@tao11.riddles.org.uk>) |
Ответы |
Re: [BUGS] Improper const-evaluation of HAVING with grouping sets and subquery pullup
|
Список | pgsql-bugs |
Here's another interesting case, without any subqueries: postgres=# SELECT g as newalias1, g as newalias3 FROM generate_series(1,3) g GROUP BY newalias1, ROLLUP(newalias3); newalias1 | newalias3 -----------+----------- 1 | 1 3 | 3 2 | 2 2 | 2 3| 3 1 | 1 (6 rows) Why are there no "summary" rows with NULLs, despite the ROLLUP? If you replace one of the g's with (g+0), you get the expected result: postgres=# SELECT g as newalias1, (g+0) as newalias3 FROM generate_series(1,3) g GROUP BY newalias1, ROLLUP(newalias3); newalias1 | newalias3 -----------+----------- 1 | 1 3 | 3 2 | 2 2 | 3 | 1 | (6 rows) - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
В списке pgsql-bugs по дате отправления: