From 66fb260c0e05fb728395f3b702d202974b7cac1a Mon Sep 17 00:00:00 2001
From: Matthias van de Meent <boekewurm+postgres@gmail.com>
Date: Mon, 22 Apr 2024 16:36:10 +0200
Subject: [PATCH v1 5/5] Remove field DeallocateStmt.isall

The field is only written to, is equivalent to !PointerIsValid(DeallocateStmt.name),
and has no current readers.
---
 src/backend/parser/gram.y      | 4 ----
 src/include/nodes/parsenodes.h | 2 --
 2 files changed, 6 deletions(-)

diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index e8b619926e..bc84f65a93 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -12179,7 +12179,6 @@ DeallocateStmt: DEALLOCATE name
 						DeallocateStmt *n = makeNode(DeallocateStmt);
 
 						n->name = $2;
-						n->isall = false;
 						n->location = @2;
 						$$ = (Node *) n;
 					}
@@ -12188,7 +12187,6 @@ DeallocateStmt: DEALLOCATE name
 						DeallocateStmt *n = makeNode(DeallocateStmt);
 
 						n->name = $3;
-						n->isall = false;
 						n->location = @3;
 						$$ = (Node *) n;
 					}
@@ -12197,7 +12195,6 @@ DeallocateStmt: DEALLOCATE name
 						DeallocateStmt *n = makeNode(DeallocateStmt);
 
 						n->name = NULL;
-						n->isall = true;
 						n->location = -1;
 						$$ = (Node *) n;
 					}
@@ -12206,7 +12203,6 @@ DeallocateStmt: DEALLOCATE name
 						DeallocateStmt *n = makeNode(DeallocateStmt);
 
 						n->name = NULL;
-						n->isall = true;
 						n->location = -1;
 						$$ = (Node *) n;
 					}
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index c5f34efe27..600dce8482 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -4070,8 +4070,6 @@ 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 */
-	bool		isall;
 	/* token location, or -1 if unknown */
 	ParseLoc	location pg_node_attr(query_jumble_location);
 } DeallocateStmt;
-- 
2.40.1

