model-writtenrun 1323 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Pavel Stehule reported that returning an uninitialized composite-domain variable raised “cache lookup failed for type 0,” while returning an ordinary composite variable succeeded #1.
- Pavel Stehule also demonstrated that explicitly assigning a composite value with null fields avoided the failure #1.
- Tom Lane traced the failure to exec_stmt_return() leaving estate->rettype unset for null records and supplied a patch sharing the existing exec_eval_datum() path for row and record variables #2.
- Tom Lane committed that implementation with an added regression test in 2b93d38205, based on #2, with backpatching through PostgreSQL 14.
- Pavel Stehule thanked Tom Lane after the commit; the thread ended with the fix landed and no outstanding requests, and this acknowledgment did not establish pre-commit review #3.