Re: pgsql: Remove function names from error messages - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Remove function names from error messages
Date
Msg-id 22053.1545280763@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Remove function names from error messages  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pgsql: Remove function names from error messages
List pgsql-committers
Michael Paquier <michael@paquier.xyz> writes:
> On Wed, Dec 19, 2018 at 07:42:31PM -0500, Tom Lane wrote:
>> Those are at least reporting SQL function names that the user will
>> recognize ... still, we don't normally localize error messages
>> by the reporting function name, so I tend to agree that these are
>> not following the style guide.

> What do you think about something like the attached?

Hm, I guess I shouldn't have used the word "localize".  I didn't
mean whether the function name should be translated; what I meant
was that we normally don't mention individual functions at all in
error messages.  The messages are supposed to be written as though
a monolithic entity "the system" is speaking to you.  So what
I'd propose here is just

         ereport(NOTICE,
                 (errmsg("waiting for required WAL segments to be archived")));

or something along that line.  I'm not sure if the "cleanup done" part
is important, but I'd tend to the idea that it isn't.

            regards, tom lane


pgsql-committers by date:

Previous
From: Greg Stark
Date:
Subject: pgsql: Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY
Next
From: Michael Paquier
Date:
Subject: pgsql: Add more tab completion for CREATE TABLE in psql