Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e46K9-0001VD-Be for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Oct 2017 14:24:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e46K8-00085X-EV for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Oct 2017 14:24:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e46K3-0007j1-MF for pgsql-bugs@postgresql.org; Mon, 16 Oct 2017 14:24:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e46K0-0000Jd-HS for pgsql-bugs@postgresql.org; Mon, 16 Oct 2017 14:24:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v9GEOY6B032320; Mon, 16 Oct 2017 10:24:34 -0400 From: Tom Lane To: Andrew Gierth cc: Heikki Linnakangas , Pg Bugs Subject: Re: Improper const-evaluation of HAVING with grouping sets and subquery pullup In-reply-to: <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> <87a80rli2w.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Mon, 16 Oct 2017 07:48:16 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32318.1508163874.1@sss.pgh.pa.us> Date: Mon, 16 Oct 2017 10:24:34 -0400 Message-ID: <32319.1508163874@sss.pgh.pa.us> 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 Gierth writes: > 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? Uh ... but I thought the point here is that the outputs aren't really constant in the presence of grouping sets. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs