Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gk25a-0003K5-V6 for pgsql-general@arkaria.postgresql.org; Thu, 17 Jan 2019 07:27:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gk25Y-0005Se-Mo for pgsql-general@arkaria.postgresql.org; Thu, 17 Jan 2019 07:27:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gk25X-0005SW-NT for pgsql-general@lists.postgresql.org; Thu, 17 Jan 2019 07:27:43 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gk25V-0007FP-9v for pgsql-general@postgresql.org; Thu, 17 Jan 2019 07:27:42 +0000 Received: from [192.168.127.1] (port=15651 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1gk25R-0007bC-Md; Thu, 17 Jan 2019 07:27:37 +0000 Received: from [127.0.0.1] (port=24343 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1gk25R-000FBX-1K; Thu, 17 Jan 2019 07:27:37 +0000 From: Andrew Gierth To: Guillaume Lelarge Cc: PostgreSQL General Subject: Re: Weird behaviour of ROLLUP/GROUPING In-Reply-To: (Guillaume Lelarge's message of "Wed, 16 Jan 2019 18:05:39 +0100") Message-ID: <87imyniwbj.fsf@news-spur.riddles.org.uk> References: <874la8lhvp.fsf@news-spur.riddles.org.uk> <87r2dck1dn.fsf@news-spur.riddles.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Thu, 17 Jan 2019 07:27:37 +0000 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "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). The regression test says it works now, but it'd be good if you could try it again on REL_11_STABLE (at commit e74d8c5085 or later) to check that it fixes your case. -- Andrew (irc:RhodiumToad)