From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Guillaume Lelarge <guillaume@lelarge.info>
Cc: PostgreSQL General <pgsql-general@postgresql.org>
Subject: Re: Weird behaviour of ROLLUP/GROUPING
Date: Wed, 16 Jan 2019 15:55:21 +0000
Message-ID: <874la8lhvp.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <CAECtzeVSO_US8C2Khgfv54ZMUOBR4sWq+6_bLrETnWExHT=rFg@mail.gmail.com>
References: <CAECtzeVSO_US8C2Khgfv54ZMUOBR4sWq+6_bLrETnWExHT=rFg@mail.gmail.com>
>>>>> "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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: andrew@tao11.riddles.org.uk, guillaume@lelarge.info
Subject: Re: Weird behaviour of ROLLUP/GROUPING
In-Reply-To: <874la8lhvp.fsf@news-spur.riddles.org.uk>
References: <CAECtzeVSO_US8C2Khgfv54ZMUOBR4sWq+6_bLrETnWExHT=rFg@mail.gmail.com> <874la8lhvp.fsf@news-spur.riddles.org.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox