Tyler Mitchell <fission@ldx.ca> writes:
> Can anyone think of any issues with IMMUTABLE in this case?
It's incorrect. The function is altering NEW, so I hardly see how you
can think it's immutable --- it has side effects.
The system might let you do this at the moment, because it pays
hardly any attention to the volatility classification of a trigger
function anyhow; but that doesn't make it a good idea.
regards, tom lane