Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3zD3-0004Tx-I3 for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Oct 2017 06:49:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e3zD2-0007Q8-SS for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Oct 2017 06:49:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e3zCJ-00069u-Ef for pgsql-bugs@postgresql.org; Mon, 16 Oct 2017 06:48:23 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e3zCG-0004az-FH for pgsql-bugs@postgresql.org; Mon, 16 Oct 2017 06:48:22 +0000 Received: from [192.168.127.1] (port=29245 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 1e3zCD-000Gmz-Tb; Mon, 16 Oct 2017 06:48:17 +0000 Received: from [127.0.0.1] (port=60880 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1e3zCD-000IAF-5n; Mon, 16 Oct 2017 06:48:17 +0000 From: Andrew Gierth To: Tom Lane Cc: Heikki Linnakangas , Pg Bugs Subject: Re: Improper const-evaluation of HAVING with grouping sets and subquery pullup In-Reply-To: <87efq3lq93.fsf@news-spur.riddles.org.uk> (Andrew Gierth's message of "Mon, 16 Oct 2017 04:50:15 +0100") Message-ID: <87a80rli2w.fsf@news-spur.riddles.org.uk> References: <7dbdcf5c-b5a6-ef89-4958-da212fe10176@iki.fi> <1197.1507820787@sss.pgh.pa.us> <87efq3lq93.fsf@news-spur.riddles.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Mon, 16 Oct 2017 07:48:16 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org >>>>> "Andrew" == Andrew Gierth writes: Andrew> I've been testing Heikki's patch with the havingQual condition Andrew> removed, and I haven't found any issues yet. Further experimentation reveals that this change has the effect of blocking constant-folding in aggregate input expressions that refer to constant outputs of the subquery. Is it worth doing anything about that? -- Andrew (irc:RhodiumToad) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs