Re: Weird behaviour of ROLLUP/GROUPING
Andrew Gierth <andrew@tao11.riddles.org.uk>
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Guillaume Lelarge <guillaume@lelarge.info>
Cc: PostgreSQL General <pgsql-general@postgresql.org>
Date: 2019-01-16T15:55:21Z
Lists: pgsql-general
>>>>> "Guillaume" == Guillaume Lelarge <guillaume@lelarge.info> writes: Guillaume> CASE grouping(to_char(b, 'MMYYYY')) Guillaume> ERROR: arguments to GROUPING must be grouping expressions of the Guillaume> associated query level Guillaume> LINE 3: CASE grouping(to_char(b, 'MMYYYY')) WHEN 1 THEN 'some date' ... Guillaume> AFAICT, both queries should behave the same, though their Guillaume> actual behaviours are quite opposite. Working fine for the Guillaume> first, erroring out on the second. Guillaume> Does anyone has any idea what's going on here? Not yet. But I will find out, since it seems to be a bug. -- Andrew (irc:RhodiumToad)
Commits
-
Postpone aggregate checks until after collation is assigned.
- d16d45387095 12.0 landed
- 174fab993414 9.4.21 landed
- 91448e7dcc1f 9.5.16 landed
- 624046abe23f 9.6.12 landed
- 409230a721cf 10.7 landed
- e74d8c5085aa 11.2 landed