model-writtenrun 812 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Marko Grujic proposed fixing incorrect parenthesized OLD/NEW values in RETURNING by skipping the whole-row projection shortcut, with regression tests for INSERT, UPDATE and DELETE #1.
- Dean Rasheed traced the underlying problem to namespace lookup ignoring varreturningtype and proposed GetNSItemByVar() to select the correct namespace item #2.
- Marko accepted the diagnosis and suggested extending the existing lookup API #3, but Dean preferred a new function to preserve compatibility for backpatches and identified row expansion and record coercion as additional callers needing attention #4.
- Marko agreed to preserve the existing API and demonstrated incorrect parenthesized star expansion #5, then submitted a replacement patch updating all three Var-based callers and adding star-expansion tests #6.
- Dean committed the revised implementation as 79c65b9d97, condensing the tests and clarifying lookup-function comments; his final message confirmed the fix was pushed and backpatched to PostgreSQL 18, leaving no outstanding work stated in the thread #7.