Bob Pawley <rjpawley@shaw.ca> writes:
> If NEW.p_id.association.monitoring_fluid is distinct from
> Old.p_id.association.monitoring_fluid Then
Surely this should just be
if new.monitoring_fluid is distinct from old.monitoring_fluid then
Also, I think you forgot an "end if" and a "return new" at the end.
regards, tom lane