From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add support for custom_query_jumble as a node field attribute |
Date: | 2025-03-25 05:19:58 |
Message-ID: | E1twwhi-000sAf-1i@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add support for custom_query_jumble as a node field attribute
This option gives the possibility for query jumble to define a custom
routine for the field of a Node, extending support for
custom_query_jumble as a node field attribute. When dealing with
complex node structures, this can be simpler than having to enforce a
custom function across a full node.
Custom functions need to be defined in queryjumblefuncs.c, named as
_jumble${node}_${field}(), and use in input the JumbleState, the node
and its field. The field is not really required if we have the Node,
but it makes custom implementations somewhat easier to think about. The
code generated by gen_node_support.pl uses a macro called
JUMBLE_CUSTOM(), hiding the internals of the logic inside
queryjumblefuncs.c.
This will be used by an upcoming patch manipulating adding a custom
routine into a field of RangeTblEntry, but this facility can become
useful in more cases.
Reviewed-by: Christoph Berg <myon(at)debian(dot)org>
Discussion: https://postgr.es/m/Z9y43-dRvb4EtxQ0@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5ac462e2b7ac97685de9f34b17296640220d0bfc
Modified Files
--------------
src/backend/nodes/gen_node_support.pl | 13 ++++++++++++-
src/backend/nodes/queryjumblefuncs.c | 3 +++
src/include/nodes/nodes.h | 4 ++++
3 files changed, 19 insertions(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2025-03-25 06:17:11 | pgsql: Generalize index support in network support function |
Previous Message | Jeff Davis | 2025-03-25 05:06:46 | pgsql: HashAgg: use Bump allocator for hash TupleHashTable entries. |