From 249b0409b181311bb1c375311e43eb767b5c3bdd Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 27 Sep 2022 10:44:42 +0200 Subject: Fix pg_stat_statements for MERGE We weren't jumbling the merge action list, so wildly different commands would be considered to use the same query ID. Add that, mention it in the docs, and some test lines. Backpatch to 15. Author: Tatsu Reviewed-by: Julien Rouhaud Discussion: https://postgr.es/m/d87e391694db75a038abc3b2597828e8@oss.nttdata.com --- src/backend/nodes/nodeFuncs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/nodes/nodeFuncs.c') diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index 724d076674e..0a7b22f97e7 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -2259,10 +2259,10 @@ expression_tree_walker_impl(Node *node, { MergeAction *action = (MergeAction *) node; - if (WALK(action->targetList)) - return true; if (WALK(action->qual)) return true; + if (WALK(action->targetList)) + return true; } break; case T_PartitionPruneStepOp: -- cgit v1.2.3