mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Fix two issues with custom_query_jumble in gen_node_support.pl
A node field marked with custom_query_jumble and query_jumble_ignore
would generate some code of a custom routine. The script is changed so
as custom_query_jumble behaves like the other options in this case,
query_jumble_ignore taking priority, with no code generated.
A comment related to the code generated for node types was misplaced.
Thinkos introduced in 5ac462e2b7
.
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/1324036.1742945060@sss.pgh.pa.us
This commit is contained in:
@ -1309,16 +1309,16 @@ _jumble${n}(JumbleState *jstate, Node *node)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# node type
|
|
||||||
if ($query_jumble_custom)
|
if ($query_jumble_custom)
|
||||||
{
|
{
|
||||||
# Custom function that applies to one field of a node.
|
# Custom function that applies to one field of a node.
|
||||||
print $jff "\tJUMBLE_CUSTOM($n, $f);\n";
|
print $jff "\tJUMBLE_CUSTOM($n, $f);\n"
|
||||||
|
unless $query_jumble_ignore;
|
||||||
}
|
}
|
||||||
elsif (($t =~ /^(\w+)\*$/ or $t =~ /^struct\s+(\w+)\*$/)
|
elsif (($t =~ /^(\w+)\*$/ or $t =~ /^struct\s+(\w+)\*$/)
|
||||||
and elem $1, @node_types)
|
and elem $1, @node_types)
|
||||||
{
|
{
|
||||||
# Squash constants if requested.
|
# Node type. Squash constants if requested.
|
||||||
if ($query_jumble_squash)
|
if ($query_jumble_squash)
|
||||||
{
|
{
|
||||||
print $jff "\tJUMBLE_ELEMENTS($f);\n"
|
print $jff "\tJUMBLE_ELEMENTS($f);\n"
|
||||||
|
Reference in New Issue
Block a user