model-writtenrun 8303 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane opened the thread by identifying transient numeric NaNs in JsonbValue and their conversion to strings during serialization, proposing that .double() reject NaN just as it rejected infinity #1.
- Alexander Korotkov initially argued that .double() should inherit PostgreSQL CAST behavior and considered supporting both NaN and infinity, while questioning whether either could be serialized consistently under the standard #2 #4.
- Oleg Bartunov explained the original compromise between PostgreSQL casts and SQL/JSON restrictions, while Robert Haas and Tom Lane argued that PostgreSQL extensions to CAST did not require equivalent jsonpath extensions #6 #8 #7.
- Alexander accepted Tom's distinction between standard CAST behavior and implementation extensions, agreeing to remove NaN support; extending jsonb and jsonpath together remained a separate possibility requiring an interoperability discussion #9 #12 #13.
- Andrew Dunstan supplied historical context for retaining PostgreSQL numeric precision in JSON and noted his concerns about jsonpath's extended use of jsonb #14.
- Alexander submitted two patches: one clarified misleading .double() conversion errors and tested numeric overflow, while the other rejected string NaNs and replaced the serialization workaround with an assertion #15.
- Tom's review supplied clearer error wording, rejected an isolated assertion in convertJsonbScalar(), and requested defensive Inf/NaN checks for numeric inputs as well as strings; Alexander incorporated these changes and proposed backpatching both fixes through PostgreSQL 12 #19 #20.
- Alexander committed both revised patches unchanged: the error-reporting fix as 0657181167 and the NaN rejection fix as df646509f3, both from #20 and backpatched through PostgreSQL 12.
- Alexander announced that both patches were pushed, and Tom acknowledged completion; no further changes remained pending in the thread #21 #22.