aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-04-25 10:20:49 +0900
committerMichael Paquier <michael@paquier.xyz>2024-04-25 10:20:49 +0900
commitee3ef4af19d8ba140a8b33c6598d470d36eec10c (patch)
tree3926ee088ef590698c25832e366ef751387f48ef
parente51c2a46b54ee294c699499bedf76940ce2f392c (diff)
downloadpostgresql-ee3ef4af19d8ba140a8b33c6598d470d36eec10c.tar.gz
postgresql-ee3ef4af19d8ba140a8b33c6598d470d36eec10c.zip
Improve comment of DeallocateStmt->isall
This field is not used directly in the code, but it is important for query jumbling to be able to make a difference between a named DEALLOCATE and DEALLOCATE ALL (see bb45156f342c). This behavior is tracked in the regression tests of pg_stat_statements, but the reason why this field is important can be easily missed, as a recent discussion has proved, so let's improve its comment to document the reason why it needs to be around. Wording has been suggested by Tom Lane Discussion: https://postgr.es/m/Zih1ATt37YFda8_p@paquier.xyz
-rw-r--r--src/include/nodes/parsenodes.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index c5f34efe271..af80a5d38e0 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -4070,7 +4070,12 @@ typedef struct DeallocateStmt
NodeTag type;
/* The name of the plan to remove, NULL if DEALLOCATE ALL */
char *name pg_node_attr(query_jumble_ignore);
- /* true if DEALLOCATE ALL */
+
+ /*
+ * True if DEALLOCATE ALL. This is redundant with "name == NULL", but we
+ * make it a separate field so that exactly this condition (and not the
+ * precise name) will be accounted for in query jumbling.
+ */
bool isall;
/* token location, or -1 if unknown */
ParseLoc location pg_node_attr(query_jumble_location);