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 ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match