From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Frontend error logging style |
Date: | 2022-03-29 14:24:18 |
Message-ID: | 6acbce27-3472-fc58-538b-ba6770ed0bfa@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 27.03.22 22:19, Tom Lane wrote:
> Here's a rebase up to today's HEAD. I've fixed the merge problems,
> but there may be some stray new error calls that could be converted
> to use pg_fatal() and haven't been. I don't want to do a full
> fresh scan of the code until we're about ready to commit this.
This looks like a good improvement to me.
I think I would want the program name/location also in front of the
detail and hint lines. I need to think about this a bit more. This
shouldn't hold up this patch; it would be a quick localized change.
(I'm also thinking about providing a separate color code for the
secondary messages. Again, this could be a quick follow-up patch.)
The one change I didn't like was
- pg_log_error("The program \"%s\" is needed by %s
but was not found in the\n"
- "same directory as
\"%s\".\n"
- "Check your installation.",
+ pg_log_error("the program \"%s\" is needed by %s
but was not found in the same directory as \"%s\"",
"postgres", progname,
full_path);
This appears to prioritize the guideline "don't punctuate error message
as full sentence" over what should be the actual guideline "don't make
the error message a full sentence".
There are other occurrences of a similar message that were not changed
in the same way by the patch. Maybe we should leave this one alone in
this patch and consider rewriting the message instead.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2022-03-29 14:38:35 | Re: Frontend error logging style |
Previous Message | James Coleman | 2022-03-29 14:20:37 | Restructure ALTER TABLE notes to clarify table rewrites and verification scans |