Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1FWn-0007J2-2D for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Jul 2021 21:56:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1FWk-00018k-SZ for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Jul 2021 21:56:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1FWk-000180-Lp for pgsql-bugs@lists.postgresql.org; Wed, 07 Jul 2021 21:56:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1FWh-0007i9-T0 for pgsql-bugs@lists.postgresql.org; Wed, 07 Jul 2021 21:56:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 167LuCP31911541; Wed, 7 Jul 2021 17:56:13 -0400 From: Tom Lane To: Andrew Gierth cc: Michael Paquier , cyg0810@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17088: FailedAssertion in prepagg.c In-reply-to: <875yxlrf5x.fsf@news-spur.riddles.org.uk> References: <17088-e33882b387de7f5c@postgresql.org> <1908212.1625690962@sss.pgh.pa.us> <87a6mxrggq.fsf@news-spur.riddles.org.uk> <1909846.1625692937@sss.pgh.pa.us> <875yxlrf5x.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Wed, 07 Jul 2021 22:32:56 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1911539.1625694972.1@sss.pgh.pa.us> Date: Wed, 07 Jul 2021 17:56:12 -0400 Message-ID: <1911540.1625694972@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> Hmm. Maybe it'd be better if the default behavior in > Tom> expression_tree_walker/mutator did not include recursing into the > Tom> args, then? > You'd think, but as I recall (I will re-check this to confirm) there > were more places where we _did_ need to recurse (especially during parse > analysis before we've matched up the sortgrouprefs), while most of the > places where recursion needed to be explicitly avoided already needed > special-case handling, so having the default the other way would likely > have required a special-case almost everywhere. Fair enough. This is the kind of design choice that can be worth revisiting later; but if the conclusion is still the same, fine with me. regards, tom lane