Thomas Hallgren <thhal@mailblocks.com> writes:
> 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?
Why not?
The real answer is "it's historical and I didn't see any need to
change it".  But one could argue that a function returning NULL
doesn't know it's supposed to be a trigger.
        regards, tom lane