Re: Frontend error logging style

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Frontend error logging style
Дата
Msg-id a06f311b-18cd-ee56-ad4c-03ed0f93713f@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Frontend error logging style  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Frontend error logging style  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 16.11.21 16:18, Robert Haas wrote:
> I think we need frontend facilities that look like the backend
> facilities, so try/catch blocks, on-exit callbacks, and whatever else
> there is. Otherwise code reuse is going to continue to be annoying.

If people want to do that kind of thing (I'm undecided whether the 
complexity is worth it), then make it a different API.  The pg_log_* 
calls are for writing formatted output.  They normalized existing 
hand-coded patterns at the time.  We can wrap another API on top of them 
that does flow control and output.  The pg_log_* stuff is more on the 
level of syslog(), which also just outputs stuff.  Nobody is suggesting 
that syslog(LOG_EMERG) should exit the program automatically.  But you 
can wrap higher-level APIs such as ereport() on top of that that might 
do that.



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Deficient error handling in pg_dump and pg_basebackup
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Non-superuser subscription owners