Re: Trigger function returning null

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Trigger function returning null
Date: 2004-08-13 14:02:12
Message-ID: 22902.1092405732@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Hallgren <thhal(at)mailblocks(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-08-13 14:02:35 to_char() and negative intervals
Previous Message Zoltan Bartko 2004-08-13 13:18:07 i18n - sk