"Claudio Rossi" <wind.claudio@inwind.it> writes:
> values[0] = ...GetDatum(...my datum...);
> ...
> values[natts-1] = ...GetDatum(...my datum...);
You've omitted the details that probably matter. My guess is that
you're inappropriately converting one of these values to a Datum,
or converting it to a Datum that's not really of the type the
tuple descriptor specifies.
regards, tom lane