What about the ~9 lines after `invchead.*,`? Those are unnamed results so their semantics are unknown. Plus, if they're all `NULL`, what's the point? Syntactically, the `RETURNING` list only needs to contain the columns that the caller expects to use, not all of the columns in the table or the `INSERT`.