The docs should mention that transition relations aren't automatically madeavailable in functions called by the trigger function. This unknownbehavior caused a lot of frustration for me.