In backend/commands/trigger.c the following can be found:
/* * Trigger protocol allows function to return a null pointer, * but NOT to set the isnull result flag. */ if (fcinfo.isnull) ereport(ERROR,
Why?
Regards,
Thomas Hallgren