Marios Vodas <mvodas(at)gmail(dot)com> writes:
> My problem is that I don't know how to construct the d_type tuple in the c
> function.
Seems like the main problem with that function is that you're passing
an uninitialized "nulls" array to heap_form_tuple.
I kinda wonder why you are using a fixed-length values array together
with a variable-length, dynamically allocated nulls array, but that'
just odd style not wrong in itself.
regards, tom lane