| From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Miscellaneous message fixes |
| Date: | 2026-02-10 05:37:52 |
| Message-ID: | 20260210.143752.1113524465620875233.horikyota.ntt@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello.
I noticed that some error messages have issues such as non-standard
wording, slightly odd output, and minor grammatical mistakes, and have
attached patches addressing each of the items below.
0001:
guc_table.c:
> .name = "effective_wal_level",
>...
> .short_desc = gettext_noop("Show effective WAL level."),
We use "shows" in that context.
0002:
partbounds.c:
> errhint("ALTER TABLE ... MERGE PARTITIONS requires the partition bounds to be adjacent."),
...
> errhint("ALTER TABLE ... SPLIT PARTITION requires the partition bounds to be adjacent."),
These messages share the same body only differ in the command name. On
the other hand we have the following message in the same file.
> errhint("%s require combined bounds of new partitions must exactly match the bound of the split partition",
> "ALTER TABLE ... SPLIT PARTITION"),
So, I think that the first two messages shoud use the same structure
with the last one.
0003:
The last message above mistakenly uses the present tense, and some
other messages do the same. I think this should be fixed.
0004:
In the messages mentioned in 0002, the sentence structure is somewhat
hard to parse. Adding “that” after “requires” should improve clarity,
as in several other messages with the same issue.
0005:
In wait.c, there are three error messages with inconsistent wording:
two use "timeout value", while one uses "timeout" to refer to the same
object. This makes translation slightly awkward, so I suggest unifying
the wording.
0006:
In extended_stats_funcs.c:
> errmsg("could not find extended statistics object \"%s\".\"%s\"",
> quote_identifier(nspname),
> quote_identifier(stxname)));
Since quote_identifier() already adds quoting when needed, adding
"%s"."%s" in the format string results in double quoting. It would be
better to use %s.%s instead. I think quoting should be applied only
when necessary here. I'm not sure we should use
quote_qualified_identifier() instead.. (It's not used in the attached
patch).
There's a similar inconsistency.
> errmsg("could not clear extended statistics object \"%s\".\"%s\": incorrect relation \"%s\".\"%s\" specified",
> get_namespace_name(nspoid), stxname,
> relnspname, relname));
In this part, the names are not passed through quote_identifier(). It
would be better to unify this as well.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Use-third-person-singular-Shows-for-reporting-variab.patch | text/x-patch | 1.2 KB |
| 0002-Consolidate-target-only-message-variants.patch | text/x-patch | 1.7 KB |
| 0003-Fix-grammar-in-a-partition-related-message.patch | text/x-patch | 4.1 KB |
| 0004-Add-omitted-that-for-clarity-in-some-messages.patch | text/x-patch | 4.2 KB |
| 0005-Unify-wording-of-timeout-error-messages.patch | text/x-patch | 901 bytes |
| 0006-Fix-double-quoting-in-extended-statistics-error-mess.patch | text/x-patch | 2.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shveta malik | 2026-02-10 06:05:13 | Re: Skipping schema changes in publication |
| Previous Message | Ashutosh Bapat | 2026-02-10 05:32:13 | Re: Changing shared_buffers without restart |