Re: Trigger function returning null

From: Thomas Hallgren <thhal(at)mailblocks(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Trigger function returning null
Date: 2004-08-13 16:08:53
Message-ID: thhal-0i3/4Aas/WQIl8l+tUu24V2OTM1iCl6@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>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.
>
>
The reason I ask is that this behavior just bit me in PL/Java. Triggers
returning null didn't work. I've fixed it at my end by simply forcing
the isnull to false for triggers. I just wanted to know if there was
some deeper thought behind this that could result in side effects.

Perhaps you should either change this behavior or make a note it in
"Writing Trigger Functions in C"? Even if the documented example use a
local isnull, it's not evident that you have to do that.

Regards,

Thomas Hallgren

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pierre-Frédéric Caillaud 2004-08-13 16:12:34 Reiser4
Previous Message Richard Huxton 2004-08-13 15:20:04 Re: Weird Database Performance problem!