Re: [PATCH] SQL function to report log message - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [PATCH] SQL function to report log message
Date
Msg-id 20150910155608.GA4887@alap3.anarazel.de
Whole thread Raw
In response to Re: [PATCH] SQL function to report log message  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] SQL function to report log message
List pgsql-hackers
On 2015-09-09 23:45:08 -0400, Tom Lane wrote:
> Were all twenty of them exactly alike?  Were they identical to Andres'
> several dozen attempts?

Mine were pretty much alike and trivial - which is why I never even
bothered to standardize on a variant and store it somewhere.

> The problem I've got with this proposal is that by the time you get to
> a function that could satisfy every possible use-case, you do not have
> something that is easier to use than "write your own function that
> addresses just your use-case".

That's a valid concern. I think the answer there is that we shouldn't
design something usable for every use-case, but rather for 90% of the
cases. Which is a tradeof we very frequently make.

> The only complaint I've seen in this thread that seems like a valid
> deficiency is that RAISE can't deal with treating the error severity level
> as a variable.  But surely we should address that as a new RAISE feature,
> not by inventing a SQL wrapper that will need to reproduce every existing
> RAISE feature before it can think about solving anything new.

That seems like something independently useful.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: dinesh kumar
Date:
Subject: Re: [PATCH] SQL function to report log message
Next
From: Alvaro Herrera
Date:
Subject: Re: Use pg_rewind when target timeline was switched