"Dave Lee" <davelee.com@xxxxxxxxx> writes: > I've read src/backend/utils/fmgr/README and it states that returning > NULL is just a matter of setting isnull to true in the > FunctionCallInfo struct, and provides a convenience macro, > PG_RETURN_NULL. But then, in InputFunctionCall, I presume you're > referring to the logic that that only allows NULL to be returned if > the source input string is also NULL, otherwise raising an error. At a > basic level, you're suggesting I need to take out this NULL check in > InputFunctionCall to get the capability I'm looking for? No, I'm stating it as a fact that that won't work. You'd have to change InputFunctionCall's API so that it could pass back a null to its callers. > Any idea why the input functions were designed this way? Per above, and the fact that the behavior you're proposing is a complete violation of the SQL spec (yeah, I know Oracle does it too). regards, tom lane