Thomas Swan <tswan(at)olemiss(dot)edu> writes:
> From what I can gather the function only gets called when both values are
> present and not when any of them are NULL.
It's sillier than that: the function does actually get called, and then
the return value is thrown away and replaced with a NULL. This is an
inherent limitation of the old function-call interface. It is fixed for
7.1 but I don't know of any good workaround for 7.0.* or before.
regards, tom lane