"Pavel Stehule" <pavel.stehule@hotmail.com> writes:
> Current code in errfinish (elog.c) throw signal only when level is error.
> I have to dynamicly change this level for all sql/psm block. Can be solution
> using of global variable? Like error_context_stack?
You certainly would not want to use TRY/CATCH to handle warnings,
because that way would cause the statement to be aborted before
completion, quite possibly without essential cleanup. Another problem
is that the conditions you are interested don't produce elog messages at
all (and shouldn't). You need a new mechanism for this, likely.
regards, tom lane