Re: proposal: catch warnings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: proposal: catch warnings
Date
Msg-id 13026.1168188154@sss.pgh.pa.us
Whole thread Raw
In response to proposal: catch warnings  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
Responses Re: proposal: catch warnings  ("Pavel Stehule" <pavel.stehule@hotmail.com>)
List pgsql-hackers
"Pavel Stehule" <pavel.stehule@hotmail.com> writes:
> PostgreSQL allow only catch exception (elevel ERROR). SQL/PSM requires that 
> warnings are catchable too.

What in the world does it mean to "catch" a warning?  If your intention
is to process arbitrary user-defined code while inside the error
subsystem, I can tell you right now that it's unlikely to work.

> Simply solution's is adding one callback  to 
> error's processing of errors on level WARNING.

I can't get excited about hooks that are defined in such a way that
there can be only one user of the hook ... if it's useful to you,
it's probably useful to someone else too.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] SGML index build fix
Next
From: Tom Lane
Date:
Subject: Re: security definer default for some PL languages (SQL/PSM)?