Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)
Дата
Msg-id ZPUsd2nHkS+UXhDc@paquier.xyz
обсуждение исходный текст
Ответ на Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Ответы Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
On Sat, Sep 02, 2023 at 09:13:11AM -0300, Ranier Vilela wrote:
> I tried to keep the same behavior as before.
> Note that if the locale equals COLLPROVIDER_LIBC,
> the message to the user will be the same.

-    /* shouldn't happen */
-    elog(ERROR, "unsupported collprovider: %c", locale->provider);
+    elog(ERROR, "collprovider '%c' does not support pg_strnxfrm_prefix()",
+             locale->provider);

Based on what's written here, these messages could be better because
full sentences are not encouraged in error messages, even for
non-translated elogs:
https://www.postgresql.org/docs/current/error-style-guide.html

Perhaps something like "could not use collprovider %c: no support for
%s", where the function name is used, would be more consistent.
--
Michael

Вложения

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

Предыдущее
От: jian he
Дата:
Сообщение: Re: Cleaning up array_in()
Следующее
От: Richard Guo
Дата:
Сообщение: Re: Assert failure in ATPrepAddPrimaryKey