[EMAIL PROTECTED] (D'Arcy J.M. Cain) writes:
> Do I have to manually create a varlena? I'll try that next.
The best way to get from a C string to a valid datum is to invoke the
datatype's input conversion routine. If you know you want text,
you could do
#define _textin(str) DirectFunctionCall1
[EMAIL PROTECTED] (D'Arcy J.M. Cain) writes:
> charcardnum[48];
> ...
> newval = CStringGetDatum(cardnum);
And you are trying to assign this datum to what kind of column?
(Hint: there isn't any kind for which a plain C string is valid data.)
regards, tom l
[EMAIL PROTECTED] (D'Arcy J.M. Cain) writes:
>> heap_formtuple is for constructing a tuple from scratch. It sounds like
>> you should be using heap_modifytuple instead.
> But I am using SPI_modifytuple(). The rest came from tracing that
> function.
Hm. Looks like the author of SPI_modifytuple
[EMAIL PROTECTED] (D'Arcy J.M. Cain) writes:
> Am I misunderstanding the call? I thought that the nulls parameter was
> to map out which values you were changing to were NULL.
heap_formtuple is for constructing a tuple from scratch. It sounds like
you should be using heap_modifytuple instead.