Add missing period to HINT messages

Started by Peter Smith1 day ago5 messageshackers
Jump to latest
#1Peter Smith
smithpb2250@gmail.com

Hi,

According to the error message style guide [1]https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GUIDE-GRAMMAR-PUNCTUATION, "Detail and hint
messages: Use complete sentences, and end each with a period."

I found there is a small group of HINT messages not following that period rule.

PSA a patch that fixes the missing period. In passing, also fixed a
typo in a hint message /msut/must/.

~~~

On further inspection, lots of these affected messages don't even seem
grammatically correct to me.

I did not modify them, but here are examples of what I mean.

e.g.
"ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have
sub-partitions."
/don't have/that don't have/

e.g.
"ALTER TABLE ... SPLIT PARTITION can only split partitions don't have
sub-partitions."
/don't have/that don't have/

e.g.
"To split DEFAULT partition one of the new partition must be DEFAULT."
missing word? -- "To split the DEFAULT partition"
should be plural? -- "one of the new partitions"

e.g.
"%s require combined bounds of new partitions must exactly match the
bound of the split partition."
/require/requires/ ?
/match the bound/match the bounds/

======
[1]: https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GUIDE-GRAMMAR-PUNCTUATION

Kind Regards,
Peter Smith.
Fujitsu Australia

Attachments:

v1-0001-Add-missing-period-to-HINT-messages.patchapplication/octet-stream; name=v1-0001-Add-missing-period-to-HINT-messages.patchDownload+29-28
#2Chao Li
li.evan.chao@gmail.com
In reply to: Peter Smith (#1)
Re: Add missing period to HINT messages

On Apr 9, 2026, at 07:30, Peter Smith <smithpb2250@gmail.com> wrote:

Hi,

According to the error message style guide [1], "Detail and hint
messages: Use complete sentences, and end each with a period."

I found there is a small group of HINT messages not following that period rule.

PSA a patch that fixes the missing period. In passing, also fixed a
typo in a hint message /msut/must/.

~~~

On further inspection, lots of these affected messages don't even seem
grammatically correct to me.

I did not modify them, but here are examples of what I mean.

e.g.
"ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have
sub-partitions."
/don't have/that don't have/

e.g.
"ALTER TABLE ... SPLIT PARTITION can only split partitions don't have
sub-partitions."
/don't have/that don't have/

e.g.
"To split DEFAULT partition one of the new partition must be DEFAULT."
missing word? -- "To split the DEFAULT partition"
should be plural? -- "one of the new partitions"

e.g.
"%s require combined bounds of new partitions must exactly match the
bound of the split partition."
/require/requires/ ?
/match the bound/match the bounds/

======
[1] https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GUIDE-GRAMMAR-PUNCTUATION

Kind Regards,
Peter Smith.
Fujitsu Australia
<v1-0001-Add-missing-period-to-HINT-messages.patch>

LGTM.

BTW, errdetail should follow the same style, and I see some detail messages miss periods, maybe this patch can include those as well.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

#3Peter Smith
smithpb2250@gmail.com
In reply to: Chao Li (#2)
Re: Add missing period to HINT messages

On Thu, Apr 9, 2026 at 12:09 PM Chao Li <li.evan.chao@gmail.com> wrote:

On Apr 9, 2026, at 07:30, Peter Smith <smithpb2250@gmail.com> wrote:

Hi,

According to the error message style guide [1], "Detail and hint
messages: Use complete sentences, and end each with a period."

I found there is a small group of HINT messages not following that period rule.

PSA a patch that fixes the missing period. In passing, also fixed a
typo in a hint message /msut/must/.

~~~

On further inspection, lots of these affected messages don't even seem
grammatically correct to me.

I did not modify them, but here are examples of what I mean.

e.g.
"ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have
sub-partitions."
/don't have/that don't have/

e.g.
"ALTER TABLE ... SPLIT PARTITION can only split partitions don't have
sub-partitions."
/don't have/that don't have/

e.g.
"To split DEFAULT partition one of the new partition must be DEFAULT."
missing word? -- "To split the DEFAULT partition"
should be plural? -- "one of the new partitions"

e.g.
"%s require combined bounds of new partitions must exactly match the
bound of the split partition."
/require/requires/ ?
/match the bound/match the bounds/

======
[1] https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GUIDE-GRAMMAR-PUNCTUATION

Kind Regards,
Peter Smith.
Fujitsu Australia
<v1-0001-Add-missing-period-to-HINT-messages.patch>

LGTM.

BTW, errdetail should follow the same style, and I see some detail messages miss periods, maybe this patch can include those as well.

Yep. It is already under way. I will post the equivalent errdetail
patch shortly. (as soon as it passes running make- check-world).

======
Kind Regards,
Peter Smith.
Fujitsu Australia

#4Chao Li
li.evan.chao@gmail.com
In reply to: Peter Smith (#3)
Re: Add missing period to HINT messages

On Apr 9, 2026, at 11:24, Peter Smith <smithpb2250@gmail.com> wrote:

On Thu, Apr 9, 2026 at 12:09 PM Chao Li <li.evan.chao@gmail.com> wrote:

On Apr 9, 2026, at 07:30, Peter Smith <smithpb2250@gmail.com> wrote:

Hi,

According to the error message style guide [1], "Detail and hint
messages: Use complete sentences, and end each with a period."

I found there is a small group of HINT messages not following that period rule.

PSA a patch that fixes the missing period. In passing, also fixed a
typo in a hint message /msut/must/.

~~~

On further inspection, lots of these affected messages don't even seem
grammatically correct to me.

I did not modify them, but here are examples of what I mean.

e.g.
"ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have
sub-partitions."
/don't have/that don't have/

e.g.
"ALTER TABLE ... SPLIT PARTITION can only split partitions don't have
sub-partitions."
/don't have/that don't have/

e.g.
"To split DEFAULT partition one of the new partition must be DEFAULT."
missing word? -- "To split the DEFAULT partition"
should be plural? -- "one of the new partitions"

e.g.
"%s require combined bounds of new partitions must exactly match the
bound of the split partition."
/require/requires/ ?
/match the bound/match the bounds/

======
[1] https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GUIDE-GRAMMAR-PUNCTUATION

Kind Regards,
Peter Smith.
Fujitsu Australia
<v1-0001-Add-missing-period-to-HINT-messages.patch>

LGTM.

BTW, errdetail should follow the same style, and I see some detail messages miss periods, maybe this patch can include those as well.

Yep. It is already under way. I will post the equivalent errdetail
patch shortly. (as soon as it passes running make- check-world).

======
Kind Regards,
Peter Smith.
Fujitsu Australia

I am not sure if your scope includes contrib/, if yes, I am sure you will find some occurrences there.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

#5Peter Smith
smithpb2250@gmail.com
In reply to: Chao Li (#4)
Re: Add missing period to HINT messages

On Thu, Apr 9, 2026 at 1:34 PM Chao Li <li.evan.chao@gmail.com> wrote:

...

I am not sure if your scope includes contrib/, if yes, I am sure you will find some occurrences there.

Updated one more message found in contrib.

PSA v2.

======
Kind Regards,
Peter Smith.
Fujitsu Australia

Attachments:

v2-0001-Add-missing-period-to-HINT-messages.patchapplication/octet-stream; name=v2-0001-Add-missing-period-to-HINT-messages.patchDownload+30-29