> > nulls = (bool *)palloc(natts*sizeof(bool *));
> >
>
> May not be related to segfault you are seeing, but this looks completely wrong.
> You want array of bool and not (bool *).
Yeah, you are right but in the original code it's:
values = (Datum *) palloc(natts * sizeof(Datum));
nulls = (bool *) palloc(natts * sizeof(bool));
I just typed it wrong, I didn't copy and paste. I also forgot to add this line (from valgrind log) at the beginning of
errorsequence:
==30549== Warning: set address range perms: large range 496753892 (undefined)
I'm clueless, any hints?