Re: Query Jumbling for CALL and SET utility statements - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Query Jumbling for CALL and SET utility statements
Date
Msg-id Y4/k8no3KMhK2HmF@paquier.xyz
Whole thread Raw
In response to Re: Query Jumbling for CALL and SET utility statements  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Tue, Oct 11, 2022 at 11:54:51AM +0900, Michael Paquier wrote:
> On Mon, Oct 10, 2022 at 09:16:47PM +0800, Julien Rouhaud wrote:
>> Unless I'm missing something both can be handled using pg_node_attr()
>> annotations that already exists?
>
> Indeed, that should work for the locators.

My mistake here.

When it comes to the locations to silence in the normalization, we
already rely on the variable name "location" of type int in
gen_node_support.pl, so we can just do the same for the code
generating the jumbling.

This stuff still needs two more pg_node_attr() to be able to work: one
to ignore a full Node in the jumbling and a second that can be used on
a  per-field basis.  Once this is in place, automating the generation
of the code is not that complicated, most of the work is to get around
placing the pg_node_attr() so as the jumbling gets things right.  The
number of fields to mark as things to ignore depends on the Node type
(heavy for Const, for example), but I'd like to think that a "ignore"
approach is better than an "include" approach so as new fields would
be considered by default in the jumble compilation.

I have not looked at all the edge cases, so perhaps more attrs would
be needed..
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Collation DDL inconsistencies
Next
From: Justin Pryzby
Date:
Subject: Re: Using WaitEventSet in the postmaster