Re: Trigger function returning null - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Trigger function returning null
Date
Msg-id 22902.1092405732@sss.pgh.pa.us
Whole thread Raw
In response to Trigger function returning null  (Thomas Hallgren <thhal@mailblocks.com>)
Responses Re: Trigger function returning null  (Thomas Hallgren <thhal@mailblocks.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: strk
Date:
Subject: Re: Dump Version
Next
From: Bruce Momjian
Date:
Subject: to_char() and negative intervals