Re: pgsql: Remove function names from error messages

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Remove function names from error messages
Дата
Msg-id 22053.1545280763@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Remove function names from error messages  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pgsql: Remove function names from error messages
Список 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 по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: pgsql: Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Add more tab completion for CREATE TABLE in psql