Re: pgsql: Remove function names from error messages

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Remove function names from error messages
Date: 2018-12-20 04:39:23
Message-ID: 22053.1545280763@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Michael Paquier <michael(at)paquier(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2018-12-20 05:32:40 pgsql: Add more tab completion for CREATE TABLE in psql
Previous Message Greg Stark 2018-12-20 02:01:15 pgsql: Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY