<vivek(at)staff(dot)ownmail(dot)com> writes:
> I dont know where am i going wrong. Here is the source.
> TriggerData *trigdata = (TriggerData *) fcinfo->context;
> TupleDesc tupdesc;
> if (CALLED_AS_TRIGGER(fcinfo)) { ==================== it comes here and enters inside.
> userfield=SPI_getvalue(trigdata->tg_trigtuple,tupdesc,17); ================== it fails here because i tried to get logs before this statement and it succeeded.
Wrong tupdesc maybe? You didn't show us what you are setting tupdesc
to.
regards, tom lane