Re: Add missing period to DETAIL messages

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Xiaopeng Wang <wxp_728(at)163(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add missing period to DETAIL messages
Date: 2026-04-16 00:22:02
Message-ID: CAHut+Ps-O6FnQwxTJVUpEQrUQNYvgxWXxUKfrt0AAc74CtFSYg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 16, 2026 at 4:26 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> On 15.04.26 09:41, Peter Smith wrote:
> > On Wed, Apr 15, 2026 at 3:48 PM Xiaopeng Wang <wxp_728(at)163(dot)com> wrote:
> >>
> > ...
> >>
> >> Looks good to me.
> >>
> >> A small comment is that, the commit message claims only “add missing period to DETAIL messages”, but apparently the patch also changes capitalization in many places, so the commit message should be updated.
> >>
> >
> > Fair point. Thanks for your review!
> >
> > PSA v4 which has an improved commit message.
>
> Most of these look good, but I don't think this is an improvement:
>
> -DETAIL: syntax error at end of input
> +DETAIL: syntax error at end of input.
>
> The guidelines say that the detail message should be a sentence. But
> this is not a sentence. Just adding a period doesn't make it a
> sentence. IMO, having a period at the end of a thing that is not a
> sentence is worse than not having it be a sentence. The latter just
> violates our quality standards, the former is confusing for a user who
> sees that particular output.

Thanks for your review.

OK, I've removed that "syntax error at end of input." change from the patch.

IIUC, the identical (non-sentence) issue also applies to other ones
like 'syntax error at or near \"%s\".'
So I removed those from the patch, too.

PSA v5, which makes the above changes.

~~

Now I am having doubts about those '%s depends on column \"%s\".' changes.

Despite looking like sentences, I have no control over the first word
capitalisation, so the results are like:
-DETAIL: rule _RETURN on view usersview depends on column "seq"
+DETAIL: rule _RETURN on view usersview depends on column "seq".

In hindsight, maybe just adding periods for these was also not
warranted? What do you think about those?

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

Attachment Content-Type Size
v5-0001-Change-DETAIL-messages-to-conform-to-the-style-gu.patch application/octet-stream 22.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jack Bonatakis 2026-04-16 00:44:38 Re: Fix a server crash problem from pg_get_database_ddl
Previous Message Hayato Kuroda (Fujitsu) 2026-04-16 00:20:15 RE: [Proposal] Adding Log File Capability to pg_createsubscriber