Clay Luther wrote:
> Hrmmmm....let me be more clear.
>
> How do I get the TupleDesc for a HeapTuple, for example? The Trigger
> structure has HeapTuples, but I need the TupleDesc as well to be able to
> use functions like SPI_getvalue().
>
Take a look at ttdummy() in src/test/regress/regress.c.
Here's a snippet of the specific lines you need:
<snip>
TriggerData *trigdata = (TriggerData *) fcinfo->context;
rel = trigdata->tg_relation;
tupdesc = rel->rd_att;
</snip>
HTH,
Joe