Re: Generating code for query jumbling through gen_node_support.pl - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Generating code for query jumbling through gen_node_support.pl
Date
Msg-id 413164.1676065208@sss.pgh.pa.us
Whole thread Raw
In response to Re: Generating code for query jumbling through gen_node_support.pl  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Generating code for query jumbling through gen_node_support.pl
List 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Rework LogicalOutputPluginWriterUpdateProgress
Next
From: Andres Freund
Date:
Subject: Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry