Tom Lane wrote:
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.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.
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
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html