Ryan Murphy <ryanfmurphy(at)gmail(dot)com> writes:
> My question is this: HeapTupleNoNulls() is run first to see if there are
> any columns that can be NULL. It looks like the fetchatt() that uses the
> cache in the tupleDesc can only be used if there are no NULLable columns in
> the table. Is my understanding correct?
No, that tests whether the particular tuple contains any null fields, not
whether the whole table is declared NOT NULL.
regards, tom lane