Hi Josef, 
Would it make sense to rename trigger related variables to "trig"
 prefix instead of "trg" as is done in other functions in the same file
 (for example in function pg_get_triggerdef)?
Not sure it would be the same as triggerdef uses trig, while triggerdef_worker uses a mix of trig and tg in the same function. It would be another patch, I believe, to and correct a prefix, then you'd have to normalize all the other functions within the same file.
--