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 1pQb80-0007HC-SM for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Feb 2023 21:40:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pQb7z-0000WD-Nu for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Feb 2023 21:40:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQb7z-0000Vu-EV for pgsql-hackers@lists.postgresql.org; Fri, 10 Feb 2023 21:40:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQb7t-0002tV-0L for pgsql-hackers@lists.postgresql.org; Fri, 10 Feb 2023 21:40:18 +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 31ALe8Tk413165; Fri, 10 Feb 2023 16:40:09 -0500 From: Tom Lane To: Michael Paquier cc: Peter Eisentraut , Postgres hackers , "Drouvot, Bertrand" Subject: Re: Generating code for query jumbling through gen_node_support.pl In-reply-to: References: <9695f035-0f2b-92b9-deed-0b7e5bb7e4e0@enterprisedb.com> <268fd337-8bb7-92e6-0da2-416c022c11f3@enterprisedb.com> <3344827.1675809127@sss.pgh.pa.us> <3972105.1675984370@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Fri, 10 Feb 2023 11:28:53 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <413163.1676065208.1@sss.pgh.pa.us> Date: Fri, 10 Feb 2023 16:40:08 -0500 Message-ID: <413164.1676065208@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > Okay, understood. Following this string of thoughts, I am a bit > surprised for two cases, though: > - PartitionPruneStep. > - Plan. > Both are abstract and both are marked with no_equal. I guess that > applying no_query_jumble to both of them is fine, and that's what you > mean? On second thought, the point of that is to allow the no_equal property to automatically inherit to child node types, so doing likewise for no_query_jumble is sensible. >> The changes in parsenodes.h seem wrong, except for RawStmt. Those node >> types are used in parsed queries, aren't they? > RTEPermissionInfo is a recent addition, as of a61b1f7. This commit > documents it as a plan node, still it is part of a Query while being > ignored in the query jumbling since its introduction, so I am a bit > confused by this one. Hmm ... it is part of Query, so that documentation is wrong, and the fact that it's not reached by query jumbling kind of seems like a bug. However, it might be that everything in it is derived from something else that *is* covered by jumbling, in which case that's okay, if underdocumented. > ... Peter E. has > mentioned upthread that a few nodes should include more jumbling while > some other parts should be ignored. This should be analyzed > separately because ~15 does not seem to be strictly right, either. Yeah. It'd surprise me not at all if people have overlooked that. v2 looks good to me as far as it goes. I agree these other questions deserve a separate look. regards, tom lane