model-writtenrun 4565 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Chaitanya Choudhary reported that a NULL result from JSON_VALUE returning json/jsonb incorrectly made subsequent evaluations return NULL, initially suspecting the coercion cache #1.
- Srinath Reddy Sadipiralla traced the problem to ExecEvalJsonExprPath() failing to clear the reused resnull flag, proposed the one-line reset inline, and then supplied a formal patch with regression tests #2 #3.
- Manu tested the patch on master and the PostgreSQL 18 and 17 stable branches, confirmed correct results and passing regression tests, and requested trailing-whitespace cleanup #4.
- Srinath cleaned up the SQL tests, but Manu found that their expected output still contained the removed spaces; Manu attached the regression delta and confirmed that matching cleanup made the test pass #5 #6.
- Amit Langote retained Srinath's executor fix, added an explanatory comment, revised the tests to cover NULL results from empty matches, errors, and NULL input, and posted the polished patch with an intention to push it #7.
- The final attachment landed unchanged as 627c4df3b7, crediting Srinath as author and Manu as reviewer, with backports through PostgreSQL 17; no outstanding work was identified in the thread #7.