Re: error messages in extended statistics

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: error messages in extended statistics
Дата
Msg-id 20190515161729.GA17418@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: error messages in extended statistics  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: error messages in extended statistics  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
On 2019-May-05, Tomas Vondra wrote:

> OK, so here is a patch, using elog() for all places except for the
> input function, where we simply report we don't accept those values.

Hmm, does this actually work?  I didn't know that elog() supported
errcode()/errmsg()/etc.  I thought the macro definition didn't allow for
that.

Anyway, since the messages are still passed with errmsg(), they would
still end up in the message catalog, so this patch doesn't help my case.
I would suggest that instead of changing ereport to elog, you should
change errmsg() to errmsg_internal().  That prevents the translation
marking, and achieves the desired effect.  (You can verify by running
"make update-po" in src/backend/ and seeing that the msgid no longer
appears in postgres.pot).

> Now, what about backpatch? It's a small tweak, but it makes the life a
> bit easier for translators ...

+1 for backpatching.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Compute XID horizon for page level index vacuum on primary.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: New EXPLAIN option: ALL