Re: Weird behaviour of ROLLUP/GROUPING

2019-01-17 Thread Guillaume Lelarge
Le jeu. 17 janv. 2019 à 08:27, Andrew Gierth a écrit : > > "Guillaume" == Guillaume Lelarge writes: > > >> I will see about fixing this, somehow. > > Guillaume> Thanks a lot. > > I've committed a fix (to all supported branches, since this bug actually > precedes the addition of GROUPING SE

Re: Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Andrew Gierth
> "Guillaume" == Guillaume Lelarge writes: >> I will see about fixing this, somehow. Guillaume> Thanks a lot. I've committed a fix (to all supported branches, since this bug actually precedes the addition of GROUPING SETS and can be triggered with a simple GROUP BY if you try hard enough)

Re: Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Guillaume Lelarge
Le mer. 16 janv. 2019 à 17:40, Andrew Gierth a écrit : > > "Andrew" == Andrew Gierth writes: > > "Guillaume" == Guillaume Lelarge writes: > > Guillaume> CASE grouping(to_char(b, 'MM')) > > Guillaume> ERROR: arguments to GROUPING must be grouping expressions of > the > Guillaume>

Re: Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Andrew Gierth
> "Andrew" == Andrew Gierth writes: > "Guillaume" == Guillaume Lelarge writes: Guillaume> CASE grouping(to_char(b, 'MM')) Guillaume> ERROR: arguments to GROUPING must be grouping expressions of the Guillaume> associated query level Guillaume> LINE 3: CASE grouping(to_char(b, 'M

Re: Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Andrew Gierth
> "Guillaume" == Guillaume Lelarge writes: Guillaume> CASE grouping(to_char(b, 'MM')) Guillaume> ERROR: arguments to GROUPING must be grouping expressions of the Guillaume> associated query level Guillaume> LINE 3: CASE grouping(to_char(b, 'MM')) WHEN 1 THEN 'some date' ...

Re: Weird behaviour of ROLLUP/GROUPING

2019-01-16 Thread Pavel Stehule
st 16. 1. 2019 v 13:51 odesílatel Guillaume Lelarge napsal: > Hi, > > One of my customers found something quite weird on his 9.6 cluster. Here > is a quick demo showing the issue: > > -- quick demo table > CREATE TABLE t1 (a integer, b timestamp, c integer); > > -- a working query > SELECT > CA