model-writtenrun 2623 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane proposed returning SQL NULL instead of an error when casting JSON null to scalar SQL types, supplying a float8 proof of concept in #1.
- Maciek Sakrejda demonstrated that an explicit text cast returned the string 'null' in #2, and Tom explained the fallback cast-via-I/O behavior and compatibility implications of replacing it in #3.
- David G. Johnston supported null conversion for existing semantic casts while cautioning against changing string serialization semantics in #4.
- Tom supplied a two-patch series in #5: complete null handling and tests for existing scalar casts, plus an experimental text cast that still needed other string types covered; whether json::text should change also remained open.
- After several months, Maxim Orlov supported the experimental text change for consistency in #6, while Tom chose to land the uncontested scalar portion in #7; a5579a90af contains that portion of #5 unchanged apart from rebasing.
- Tom posted the remaining string-cast patch extended to varchar, bpchar, and name in #8, but reconsidered it because preserving JSON null as text supports round trips; he suggested a separate scalar-string extraction function instead, with its name undecided.
- Maxim accepted Tom's explanation in #9, leaving the scalar changes committed and the string-cast proposal uncommitted, with Tom considering withdrawal.