I am trying to write a C trigger. Essentially
TriggerData *in = (TriggerData *) fcinfo->context;
HeapTupleHeader tuple=in->tg_trigtuple->t_data;
Datum datum;
datum = GetAttributeByName(tuple, "unit_id", &isnull);
and that last line fails with
ERROR: cache lookup failed for type 4664
I haven't seen anything similar in the documentation.. What is wrong / the
correct way of extracting values from the old/new rows in a C trigger fn?
Cheers,
Patrick