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-09T23:12:50Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> Tom, did you get a chance to look at what is proposed here and expand
> the use of query_jumble_ignore in the definitions of the nodes rather
> than have an enforced per-file policy in gen_node_support.pl?

Sorry, didn't look at it before.

I'm okay with the pathnodes.h changes --- although surely you don't need
changes like this:

-	pg_node_attr(abstract)
+	pg_node_attr(abstract, no_query_jumble)

"abstract" should already imply "no_query_jumble".

I wonder too if you could shorten the changes by making no_query_jumble
an inheritable attribute, and then just applying it to Path and Plan.

The changes in parsenodes.h seem wrong, except for RawStmt.  Those node
types are used in parsed queries, aren't they?

			regards, tom lane



Commits

  1. Mark more nodes with attribute no_query_jumble

  2. Include values of A_Const nodes in query jumbling

  3. Generate code for query jumbling through gen_node_support.pl

  4. Rework format of comments in headers for nodes

  5. Move queryjumble.c code to src/backend/nodes/

  6. Fix some compiler warnings in aset.c and generation.c

  7. Reformat some node comments