Re: Weird behaviour of ROLLUP/GROUPING

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Weird behaviour of ROLLUP/GROUPING
Date: 2019-01-16 15:55:21
Message-ID: 874la8lhvp.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>>> "Guillaume" == Guillaume Lelarge <guillaume(at)lelarge(dot)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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexey Bashtanov 2019-01-16 16:34:59 Re: Array_agg and dimensions in Array
Previous Message aaaaaa 2019-01-16 14:36:50 problem in regard to hot standby