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?


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to