Re: trappable warnings, dynamic change of minimal level for PG_RE_THROW

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, neilc(at)samurai(dot)com
Subject: Re: trappable warnings, dynamic change of minimal level for PG_RE_THROW
Date: 2006-12-05 20:18:38
Message-ID: 10639.1165349918@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-12-05 20:25:47 psql possible TODO
Previous Message Tom Lane 2006-12-05 20:14:39 Re: [HACKERS] Configuring BLCKSZ and XLOGSEGSZ (in 8.3)