Обсуждение: elog: clarify usage and style of error reporting functions

Поиск
Список
Период
Сортировка

elog: clarify usage and style of error reporting functions

От
Chao Li
Дата:
Hi,

This came up while reviewing a patch [1], where Tom pointed out the difference between elog() and ereport() and
referencedthe corresponding documentation [2]. While doing patch reviews, I have also noticed many inconsistencies in
thestyle of detail and hint messages. Even in the current code base, these inconsistencies are quite common. The
PostgreSQLdocumentation [3] already provides guidelines for writing such messages. 

For these logging functions, developers are more likely to read the function header comments than the external
documentation,so it seems useful to include brief guidelines directly in the code. 

This patch adds short style guidelines to the relevant logging functions.

[1] https://postgr.es/m/297458.1772811905@sss.pgh.pa.us
[2] https://www.postgresql.org/docs/devel/error-message-reporting.html
[3] https://www.postgresql.org/docs/current/error-style-guide.html

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/




Вложения