Juan Jose Costello Levien <jcostello(at)datafull(dot)com> writes:
> I don't know if tgargs[] return the row values or the field names.
Neither --- it's the (fixed) arguments you used in the CREATE TRIGGER
command. You'll need to do something involving extracting field values
from the tuple that is passed to the trigger, instead.
I'd suggest looking in the contrib/ modules for examples of triggers
written in C.
regards, tom lane