Can I trigger an action from a coalesce ? - Mailing list pgsql-general

From stan
Subject Can I trigger an action from a coalesce ?
Date
Msg-id 20200222210206.GA17445@panix.com
Whole thread Raw
Responses Re: Can I trigger an action from a coalesce ?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Can I trigger an action from a coalesce ?  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List pgsql-general
I have a case where if a value does not exist, I am going to use a default,
which is easy with coalesce. But I would like to warn the user that a
default has been supplied. The default value is reasonable, and could
actually come from the source table, so I can't just check the value.
I'd like to do a raise NOTICE, if the default portion of the coalesce fires.

Anyone have a good way to accomplish this?


-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
                        -- Benjamin Franklin



pgsql-general by date:

Previous
From: Edson Richter
Date:
Subject: RE: Replication: slave server has 3x size of production server?
Next
From: Adrian Klaver
Date:
Subject: Re: Can I trigger an action from a coalesce ?