not logging caught exceptions

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема not logging caught exceptions
Дата
Msg-id 1257974649.22025.34.camel@vanquo.pezone.net
обсуждение исходный текст
Ответы Re: not logging caught exceptions
Список pgsql-hackers
Is it at all reasonable to try to create some mechanism so that
exceptions (elog) that are caught and not rethrown do not end up in the
log?  For example, when you write code that does something like

try   insert
catch unique_constraint_violation   update
end try

this will end up cluttering the logs with all the constraint violation
messages.

Now, we probably don't want to just suppress all logging in a TRY block
until the END_TRY.  So maybe this could be an argument to TRY or a
separate statement that would typically be run right after TRY that
names exception types to handle specially.  Higher level languages such
as PL/pgSQL could then peek ahead to the catch block to set this up.

Comments?



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Patch committers
Следующее
От: Joachim Wieland
Дата:
Сообщение: Listen / Notify rewrite