Re: trappable warnings, dynamic change of minimal level for PG_RE_THROW - Mailing list pgsql-hackers

From Tom Lane
Subject Re: trappable warnings, dynamic change of minimal level for PG_RE_THROW
Date
Msg-id 10639.1165349918@sss.pgh.pa.us
Whole thread Raw
In response to trappable warnings, dynamic change of minimal level for PG_RE_THROW  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
List pgsql-hackers
"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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Configuring BLCKSZ and XLOGSEGSZ (in 8.3)
Next
From: "Joshua D. Drake"
Date:
Subject: psql possible TODO