Andres Freund <andres@anarazel.de> writes:
>> Puting optional context via the fcinfo looks novel to me (I have zero
>> experience to use fcinfo utility.).
> We do that in a bunch of places, e.g. for the context of window functions
> (c.f. PG_WINDOW_OBJECT() WindowObjectIsValid()).
A closely related precedent is the introduction of "soft error
reporting" for input functions. See d9f7f5d32 and follow-ons.
regards, tom lane