Re: Generating code for query jumbling through gen_node_support.pl
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>,
Postgres hackers <pgsql-hackers@lists.postgresql.org>,
"Drouvot,
Bertrand" <bdrouvot@amazon.com>
Date: 2023-02-10T21:40:08Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.xyz> 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
Commits
-
Mark more nodes with attribute no_query_jumble
- 2a507f6fd8b7 16.0 landed
-
Include values of A_Const nodes in query jumbling
- 9ba37b2cb6a1 16.0 landed
-
Generate code for query jumbling through gen_node_support.pl
- 3db72ebcbe20 16.0 landed
-
Rework format of comments in headers for nodes
- 5d29d525ffe0 16.0 landed
-
Move queryjumble.c code to src/backend/nodes/
- 8eba3e3f0208 16.0 landed
-
Fix some compiler warnings in aset.c and generation.c
- b82557ecc2eb 16.0 cited
-
Reformat some node comments
- 835d476fd21b 16.0 cited