| From: | yangyz <1197620467(at)qq(dot)com> |
|---|---|
| To: | Sahitya Chandra <sahityajb(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Cc: | Sahitya Chandra <sahityajb(at)gmail(dot)com> |
| Subject: | Re: [PATCH] Remove trailing period from errmsg in subscriptioncmds.c |
| Date: | 2026-03-09 08:51:34 |
| Message-ID: | tencent_F9113CB77F26928EF32BB518597BB4C72605@qq.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
LGTM, according to https://www.postgresql.org/docs/18/error-style-guide.html
Primary error messages: Do not capitalize the first letter. Do not end a message with a period. Do not even think about ending a message with an exclamation point.
regards,
Yuanzhuo Yang
Original
From: Sahitya Chandra <sahityajb(at)gmail(dot)com>
Date: 2026-03-08 22:28
To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Sahitya Chandra <sahityajb(at)gmail(dot)com>
Subject: [PATCH] Remove trailing period from errmsg in subscriptioncmds.c
Hi,
While reading the subscription code I noticed one error message that doesn't follow the project's style: in check_remote_recovery_state() in subscriptioncmds.c, the errmsg() for the "publisher is in recovery" case ends with a period. The convention elsewhere (including the similar message a few lines above in the same file) is no trailing period.
The attached one-line patch removes the trailing period from that string. No behavior change.
Thanks,
Sahitya Chandra
---
src/backend/commands/subscriptioncmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 9e21d7a7df9..724637cff5b 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -2993,7 +2993,7 @@ check_pub_dead_tuple_retention(WalReceiverConn *wrconn)
if (remote_in_recovery)
ereport(ERROR,
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot enable retain_dead_tuples if the publisher is in recovery."));
+ errmsg("cannot enable retain_dead_tuples if the publisher is in recovery"));
ExecDropSingleTupleTableSlot(slot);
--
2.43.0
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hüseyin Demir | 2026-03-09 09:02:26 | Re: client_connection_check_interval default value |
| Previous Message | Jim Jones | 2026-03-09 08:47:42 | Re: [PoC] XMLCast (SQL/XML X025) |