sub_woofer <tqzelijah(at)yahoo(dot)co(dot)uk> writes:
> IF (((TG_OP = 'INSERT') AND (new.subjects=TRUE)) OR ((TG_OP='UPDATE') AND
> (new.subjects=TRUE) AND (old.subjects=FALSE))) THEN
You can't do that. Split the IF apart so that you don't touch NEW or
OLD in the same if-test that tries to determine if they're safe to
touch.
regards, tom lane