Re: Add missing error codes to PANIC/FATAL error reports in xlog.c and relcache.c

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Add missing error codes to PANIC/FATAL error reports in xlog.c and relcache.c
Дата
Msg-id 2F60920E-74C4-4FB3-93D5-670890A53B99@yesql.se
обсуждение исходный текст
Ответ на Re: Add missing error codes to PANIC/FATAL error reports in xlog.c and relcache.c  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Ответы Re: Add missing error codes to PANIC/FATAL error reports in xlog.c and relcache.c  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Список pgsql-hackers
> On 23 Feb 2024, at 13:09, Nazir Bilal Yavuz <byavuz81@gmail.com> wrote:

> Does errmsg_internal() need to be used all the time when turning elogs
> into ereports? errmsg_internal()'s comment says that "This should be
> used for "can't happen" cases that are probably not worth spending
> translation effort on.". Is it enough to check if the error message
> has a translation, and then decide the use of errmsg_internal() or
> errmsg()?

If it's an elog then it won't have a translation as none are included in the
translation set.  If the errmsg is generic enough to be translated anyways via
another (un)related ereport call then we of course use that, but ideally not
create new ones.

--
Daniel Gustafsson




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

Предыдущее
От: Nazir Bilal Yavuz
Дата:
Сообщение: Re: Add missing error codes to PANIC/FATAL error reports in xlog.c and relcache.c
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: table inheritance versus column compression and storage settings