Re: Generating code for query jumbling through gen_node_support.pl

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>
Subject: Re: Generating code for query jumbling through gen_node_support.pl
Date: 2023-01-23 13:27:13
Message-ID: bf604c8d-b6e9-284b-327a-cac8417a74e8@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 21.01.23 04:35, Michael Paquier wrote:
>> I'll read the 0003 again more carefully. I haven't studied the new 0004
>> yet.
>
> Thanks, again. Rebased version attached.

A couple of small fixes are attached.

There is something weird in _jumbleNode(). There are two switch
(nodeTag(expr)) statements. Maybe that's intentional, but then it
should be commented better, because now it looks more like an editing
mistake.

The handling of T_RangeTblEntry could be improved. In other contexts we
have for example a custom_copy attribute, which generates the switch
entry but not the function. Something like this could be useful here too.

Otherwise, this looks ok. I haven't checked whether it maintains the
exact behavior from before. What is the test coverage situation for this?

For the 0004 patch, it should be documented why one would want one
behavior or the other. That's totally unclear right now.

I think if we are going to accept 0004, then it might be better to
combine it with 0003. Otherwise, 0004 is just undoing a lot of the code
structure changes in JumbleQuery() that 0003 did.

Attachment Content-Type Size
0001-fixup-Support-for-automated-query-jumble-with-all-No.patch text/plain 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2023-01-23 13:31:04 Fix incorrect comment reference
Previous Message Melih Mutlu 2023-01-23 13:00:01 Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication