From c6b830e45000f5b879574e1147c498d2c8891594 Mon Sep 17 00:00:00 2001
From: Shlok Kyal <shlok.kyal.oss@gmail.com>
Date: Wed, 24 Dec 2025 12:04:48 +0530
Subject: [PATCH v1] Improve comment for GetPublicationRelations

The comment for GetPublicationRelations previously stated that the
function should only be used for FOR TABLE publications. However, the
function can also be invoked for FOR ALL SEQUENCES publications in some
cases.

Update the comment to reflect the current behavior when the function is
called for FOR ALL TABLES or FOR ALL SEQUENCES publications.
---
 src/backend/catalog/pg_publication.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c
index 7aa3f179924..46183f1fba7 100644
--- a/src/backend/catalog/pg_publication.c
+++ b/src/backend/catalog/pg_publication.c
@@ -776,8 +776,12 @@ GetRelationPublications(Oid relid)
 /*
  * Gets list of relation oids for a publication.
  *
- * This should only be used FOR TABLE publications, the FOR ALL TABLES/SEQUENCES
- * should use GetAllPublicationRelations().
+ * This is mainly used for FOR TABLE publications. When invoked for
+ * FOR ALL SEQUENCES or FOR ALL TABLES publications, the result is an empty
+ * list.
+ *
+ * Use GetAllPublicationRelations() for FOR ALL TABLES or FOR ALL SEQUENCES
+ * publications.
  */
 List *
 GetPublicationRelations(Oid pubid, PublicationPartOpt pub_partopt)
-- 
2.34.1

