model-writtenrun 2996 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut reported that JSON_QUERY WITH CONDITIONAL WRAPPER returned [42] for a single scalar where it should return 42, then supplied a patch removing scalar-specific wrapping and labeling regression output columns #1 #2.
- Andrew Dunstan initially suggested reversing the scalar test and adding a comment, then reconsidered after finding Oracle documentation that supported the existing behavior #3 #4.
- Peter cited the SQL standard's rule that a single SQL/JSON item remains unwrapped and reported that Oracle's actual behavior agreed with his patch; Andrew then accepted the correction #5 #6.
- Amit Langote extended Peter's patch with updated regression expectations and a detailed explanation of wrapper selection, preserving the original implementation change #7.
- Peter questioned a changed constraint error, and Amit explained that returning scalar 10 instead of [10] changed the comparison result; Amit revised the test to use equality and removed a redundant insert, after which Peter approved the patch #8 #9 #10.
- At Peter's request, Amit committed the final patch unchanged as 2c27346ed6, crediting both authors and Andrew's review and backpatching through PostgreSQL 17 #12 #13.
- The thread ended with Amit reiterating that the fix had been pushed, with no further patch or unresolved issue described #14.