summaryrefslogtreecommitdiff
path: root/src/backend/nodes
diff options
context:
space:
mode:
authorPeter Eisentraut2024-03-22 06:12:28 +0000
committerPeter Eisentraut2024-03-22 06:23:47 +0000
commit367c989cd8405663bb9a35ec1aa4f79b673a55ff (patch)
tree301fc672765e8af25fd689f60d88ef75fb84d8d4 /src/backend/nodes
parentd575051b9af99f9299dc33e627931ab612d8a147 (diff)
Remove custom _jumbleRangeTblEntry()
This is part of an effort to reduce the number of special cases in the automatically generated node support functions. This patch removes _jumbleRangeTblEntry() and instead adds per-field query_jumble_ignore annotations to match the behavior of the previous custom code. The pg_stat_statements test suite has some coverage of this. It gets rid of the switch on rtekind; this should be technically correct, since we do the equal and copy functions like this also. The list of fields to jumble has been checked and is considered correct as of 8b29a119fd. Reviewed-by: Andrew Dunstan <andrew@dunslane.net> Discussion: https://www.postgresql.org/message-id/flat/4b27fc50-8cd6-46f5-ab20-88dbaadca645@eisentraut.org
Diffstat (limited to 'src/backend/nodes')
-rw-r--r--src/backend/nodes/queryjumblefuncs.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/backend/nodes/queryjumblefuncs.c b/src/backend/nodes/queryjumblefuncs.c
index 2c116c87288..be823a7f8fa 100644
--- a/src/backend/nodes/queryjumblefuncs.c
+++ b/src/backend/nodes/queryjumblefuncs.c
@@ -353,52 +353,3 @@ _jumbleA_Const(JumbleState *jstate, Node *node)
}
}
}
-
-static void
-_jumbleRangeTblEntry(JumbleState *jstate, Node *node)
-{
- RangeTblEntry *expr = (RangeTblEntry *) node;
-
- JUMBLE_FIELD(rtekind);
- switch (expr->rtekind)
- {
- case RTE_RELATION:
- JUMBLE_FIELD(relid);
- JUMBLE_FIELD(inh);
- JUMBLE_NODE(tablesample);
- break;
- case RTE_SUBQUERY:
- JUMBLE_NODE(subquery);
- break;
- case RTE_JOIN:
- JUMBLE_FIELD(jointype);
- break;
- case RTE_FUNCTION:
- JUMBLE_NODE(functions);
- JUMBLE_FIELD(funcordinality);
- break;
- case RTE_TABLEFUNC:
- JUMBLE_NODE(tablefunc);
- break;
- case RTE_VALUES:
- JUMBLE_NODE(values_lists);
- break;
- case RTE_CTE:
-
- /*
- * Depending on the CTE name here isn't ideal, but it's the only
- * info we have to identify the referenced WITH item.
- */
- JUMBLE_STRING(ctename);
- JUMBLE_FIELD(ctelevelsup);
- break;
- case RTE_NAMEDTUPLESTORE:
- JUMBLE_STRING(enrname);
- break;
- case RTE_RESULT:
- break;
- default:
- elog(ERROR, "unrecognized RTE kind: %d", (int) expr->rtekind);
- break;
- }
-}