Fix some errdetail's message format

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Fix some errdetail's message format
Date: 2024-01-23 07:33:33
Message-ID: 20240123.163333.1298300821427127691.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

We recently made corrections to the capitalization of DETAIL messages.
For example;

- GUC_check_errdetail("invalid list syntax in parameter %s",
+ GUC_check_errdetail("Invalid list syntax in parameter %s",

But still it is missing the period at the end.

There are several patterns to this issue, but this time, I have only
fixed the ones that are simple and obvious as follows:

a. GUC_check_errdetail("LITERAL"), errdetail("LITERAL") without a period.
b. psprintf()'ed string that is passed to errdetail_internal()

I didn't touch the following patterns:

c. errdetail_internal("%s")
d. errdetail("Whatever: %s")
e. errdetail("%s versus %s") and alikes
f. errdetail_internal("%s", pchomp(PQerrorMessage()))
g. complex message compilation

The attached patch contains the following fix:

- GUC_check_errdetail("timestamp out of range: \"%s\"", str);
+ GUC_check_errdetail("Timestamp out of range: \"%s\".", str);

But I'm not quite confident about whether capitalizing the type name
here is correct.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
fix_detail_messages.patch text/x-patch 10.2 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-01-23 07:43:50 Re: Multiple startup messages over the same connection
Previous Message Yugo NAGATA 2024-01-23 07:23:27 Re: Incremental View Maintenance, take 2