I found some doubious messages.

catalog.c:380, 404
> errdetail("OID candidates were checked \"%llu\"  times, but no unused OID is 
> yet found.",
> (errmsg("new OID has been assigned in relation \"%s\" after \"%llu\" retries",

It looks strange that %llu is enclosed by double-quotes and followed by
two spaces.

pg_inherits.c:542
> errhint("Use ALTER TABLE ... DETACH PARTITION ... FINALIZE to complete the 
> pending detach operation")));
pg_type.c:991
> errhint("You can manually specify a multirange type name using the 
> \"multirange_type_name\" attribute")));

A period is missing.

search_cte.c: 520, 527
> errmsg("search sequence column name and cycle mark column name are the same"),
> errmsg("search_sequence column name and cycle path column name are the same"),

The underscore in the latter seems like a typo.


partbounds.c: 2871, 2902
> errdetail("The new modulus %d is not a factor of %d, the modulus of existing 
> partition \"%s\".",
> errdetail("The new modulus %d is not factor of %d, the modulus of existing 
> partition \"%s\".",

The latter seems to be missing an article.

A possible fix is attched.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 245d536372..16df845f82 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -377,7 +377,7 @@ GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
 			ereport(LOG,
 					(errmsg("still finding an unused OID within relation \"%s\"",
 							RelationGetRelationName(relation)),
-					 errdetail("OID candidates were checked \"%llu\"  times, but no unused OID is yet found.",
+					 errdetail("OID candidates were checked %llu times, but no unused OID is yet found.",
 							   (unsigned long long) retries)));
 
 			/*
@@ -400,7 +400,7 @@ GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
 	if (retries > GETNEWOID_LOG_THRESHOLD)
 	{
 		ereport(LOG,
-				(errmsg("new OID has been assigned in relation \"%s\" after \"%llu\" retries",
+				(errmsg("new OID has been assigned in relation \"%s\" after %llu retries",
 						RelationGetRelationName(relation), (unsigned long long) retries)));
 	}
 
diff --git a/src/backend/catalog/pg_inherits.c b/src/backend/catalog/pg_inherits.c
index bb8b2249b1..f88436977f 100644
--- a/src/backend/catalog/pg_inherits.c
+++ b/src/backend/catalog/pg_inherits.c
@@ -539,7 +539,7 @@ DeleteInheritsTuple(Oid inhrelid, Oid inhparent, bool expect_detach_pending,
 						 errmsg("cannot detach partition \"%s\"",
 								childname ? childname : "unknown relation"),
 						 errdetail("The partition is being detached concurrently or has an unfinished detach."),
-						 errhint("Use ALTER TABLE ... DETACH PARTITION ... FINALIZE to complete the pending detach operation")));
+						 errhint("Use ALTER TABLE ... DETACH PARTITION ... FINALIZE to complete the pending detach operation.")));
 			if (!detach_pending && expect_detach_pending)
 				ereport(ERROR,
 						(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c
index dc9d28a32c..b639248315 100644
--- a/src/backend/catalog/pg_type.c
+++ b/src/backend/catalog/pg_type.c
@@ -988,7 +988,7 @@ makeMultirangeTypeName(const char *rangeTypeName, Oid typeNamespace)
 				(errcode(ERRCODE_DUPLICATE_OBJECT),
 				 errmsg("type \"%s\" already exists", buf),
 				 errdetail("Failed while creating a multirange type for type \"%s\".", rangeTypeName),
-				 errhint("You can manually specify a multirange type name using the \"multirange_type_name\" attribute")));
+				 errhint("You can manually specify a multirange type name using the \"multirange_type_name\" attribute.")));
 
 	return pstrdup(buf);
 }
diff --git a/src/backend/parser/parse_cte.c b/src/backend/parser/parse_cte.c
index f46d63d451..ee7613187a 100644
--- a/src/backend/parser/parse_cte.c
+++ b/src/backend/parser/parse_cte.c
@@ -524,7 +524,7 @@ analyzeCTE(ParseState *pstate, CommonTableExpr *cte)
 				   cte->cycle_clause->cycle_path_column) == 0)
 			ereport(ERROR,
 					errcode(ERRCODE_SYNTAX_ERROR),
-					errmsg("search_sequence column name and cycle path column name are the same"),
+					errmsg("search sequence column name and cycle path column name are the same"),
 					parser_errposition(pstate, cte->search_clause->location));
 	}
 }
diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c
index 1290d45963..be301e96a3 100644
--- a/src/backend/partitioning/partbounds.c
+++ b/src/backend/partitioning/partbounds.c
@@ -2899,7 +2899,7 @@ check_new_partition_bound(char *relname, Relation parent,
 								ereport(ERROR,
 										(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
 										 errmsg("every hash partition modulus must be a factor of the next larger modulus"),
-										 errdetail("The new modulus %d is not factor of %d, the modulus of existing partition \"%s\".",
+										 errdetail("The new modulus %d is not a factor of %d, the modulus of existing partition \"%s\".",
 												   spec->modulus, next_modulus,
 												   get_rel_name(partdesc->oids[boundinfo->indexes[offset + 1]]))));
 						}

Reply via email to