Tom Jenkins <tjenkins(at)devis(dot)com> writes:
> I believe the logic is correct (if the python object is None then send
> to the typfunc a NULL) but I don't know how to code it correctly.
You shouldn't call the typfunc at all if you want a NULL --- just set
the null flag for that datum slot.
regards, tom lane