From ca4357fdd125b5135e0d9da887aabf2c062e5220 Mon Sep 17 00:00:00 2001
From: Shlok Kyal <shlok.kyal.oss@gmail.com>
Date: Mon, 10 Nov 2025 13:48:28 +0530
Subject: [PATCH v1] Remove unused n->pubobjects assignment for CREATE
 PUBLICATION .. ALL TABLES/SEQUNECES

For grammar: CREATE PUBLICATION name FOR pub_obj_type_list opt_definition
"n->pubobjects" is assigned but later in the code it is not used. It is
used in function "ObjectsInPublicationToOids" and donot require it for
ALL TABLES or ALL SEQUENCES publication.
This patch removes the assignment of "n->pubobjects" for above grammar.
---
 src/backend/parser/gram.y | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 57fe0186547..dfe757b8f5e 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -10761,7 +10761,6 @@ CreatePublicationStmt:
 					CreatePublicationStmt *n = makeNode(CreatePublicationStmt);
 
 					n->pubname = $3;
-					n->pubobjects = (List *) $5;
 					preprocess_pub_all_objtype_list($5, &n->for_all_tables,
 													&n->for_all_sequences,
 													yyscanner);
-- 
2.34.1

