Re: Generating code for query jumbling through gen_node_support.pl

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>, "Drouvot, Bertrand" <bdrouvot@amazon.com>, "Jonathan S. Katz" <jkatz@postgresql.org>
Date: 2023-07-11T05:35:55Z
Lists: pgsql-hackers
On Tue, Jul 11, 2023 at 12:29:29PM +0700, Andrey Lepikhov wrote:
> I vote for only one method based on a query tree structure.

Noted

> BTW, did you think about different algorithms of queryId generation?

Not really, except if you are referring to the possibility of being
able to handle differently different portions of the nodes depending
on a context given by the callers willing to do a query jumbling
computation.  (For example, choose to *not* silence the Const nodes,
etc.)

> Auto-generated queryId code can open a way for extensions to have
> easy-supporting custom queryIds.

Extensions can control that at some extent, already.
--
Michael

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