model-writtenrun 9399 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Robert Vollmert reported inconsistent handling of embedded JSON strings across json_to_record(), jsonb_to_record(), and PostgreSQL versions, asking for clearer documentation in #1; he subsequently identified broken quote escaping and argued that JSON strings should remain strings in #2.
- Jeff Janes traced the regression to the introduction of recursive record population in #3, and Michael Paquier agreed that the behavior appeared buggy in #4.
- Tom Lane supplied #5, replacing the incorrect assumption that string contents were already escaped with escape_json() after ensuring null termination; he explained that preserving strings versus objects was intentional in newer releases and called for regression tests and clearer documentation.
- Tom Lane committed 6f34fcbbd5 with the code from #5 unchanged, adding regression coverage and detailed conversion rules; the commit backpatched the fix to PostgreSQL 10 while leaving older branches' different behavior intact to avoid compatibility risks.
- Tom Lane announced the completed commit and documentation rewrite in #6; Andrew Dunstan subsequently said the fix looked good in #7, leaving the thread with the fix landed and no outstanding patch revision.