"Han Holl" <han(dot)holl(at)prismant(dot)nl> writes:
> I need to call a function when updating on a view, like :
> create rule udps_upd as on update to udps do
> instead select function_call();
> My problem: how do I get a reference to OLD and NEW ?
> I tried function_call(OLD, NEW) -- parse error
I think you'll need to do it as
function_call(old.col1, old.col2, ..., new.col1, new.col2, ...)
Pretty tedious :-( but the rule rewriter doesn't support whole-row
references to OLD or NEW.
regards, tom lane