Andres Freund <andres@anarazel.de> writes:
> I wonder if we ought to make PG_GETARG_DATUM(n) assert that !PG_ARGISNULL(n)?
> That'd perhaps make it easier to catch some of these...
Don't see the point; such cases will crash just fine without any
assert. The problem is lack of test coverage ...
> It'd be nice to have a test in sanity check to just call each non-strict
> function with NULL inputs automatically. But the potential side-effects
> probably makes that not a realistic option?
... and as you say, brute force testing seems difficult. I'm
particularly worried about multi-argument functions, as in
principle we'd need to check each argument separately, and cons
up something plausible to pass to the other arguments.
regards, tom lane