Hi,
Should it be: "return true if attnum is out of range according to the
tupdesc" instead of "return NULL if attnum is out of range according
to the tupdesc" at src/backend/access/common/heaptuple.c: 1345
/*
* return true if attnum is out of range according to the tupdesc
*/
if (attnum > tupleDesc->natts)
return true;
Attached patch fixes this.
--
Amit Langote