From cab8e36ef5ec98b0988b5b0115570fee61dec7b8 Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: Thu, 5 Feb 2026 13:17:58 +0900
Subject: [PATCH 2/6] Consolidate target-only message variants

Consolidate two messages that differ only in their targets into a
single translation unit.
---
 src/backend/partitioning/partbounds.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c
index 0ca312ac27d..d8f48cb0868 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -5033,7 +5033,8 @@ check_two_partitions_bounds_range(Relation parent,
 						   second_name->relname, first_name->relname),
 					errdetail("lower bound of partition \"%s\" is not equal to the upper bound of partition \"%s\"",
 							  second_name->relname, first_name->relname),
-					errhint("ALTER TABLE ... MERGE PARTITIONS requires the partition bounds to be adjacent."),
+					errhint("%s requires the partition bounds to be adjacent.",
+							"ALTER TABLE ... MERGE PARTITIONS"),
 					parser_errposition(pstate, datum->location));
 		else
 			ereport(ERROR,
@@ -5042,7 +5043,8 @@ check_two_partitions_bounds_range(Relation parent,
 						   second_name->relname, first_name->relname),
 					errdetail("lower bound of partition \"%s\" is not equal to the upper bound of partition \"%s\"",
 							  second_name->relname, first_name->relname),
-					errhint("ALTER TABLE ... SPLIT PARTITION requires the partition bounds to be adjacent."),
+					errhint("%s requires the partition bounds to be adjacent.",
+							"ALTER TABLE ... SPLIT PARTITION"),
 					parser_errposition(pstate, datum->location));
 	}
 }
-- 
2.47.3

