model-writtenrun 3318 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Erik Wienhold reported that $1_2 silently became $1 and proposed accepting underscores correctly by replacing atol() with checked conversion, while also presenting rejection as an alternative in #1.
- Michael Paquier favored rejecting underscores in #2, Dean Rasheed identified the scanner-rule reuse as accidental and requested an explanatory comment in #3, and Tom Lane supported restoring the previous behavior in #4.
- Erik split the work in #5 into underscore rejection across all three scanners and independent overflow checks for backend and ECPG parameter parsing; Michael reviewed both parts favorably in #7.
- Peter Eisentraut landed the underscore-rejection portion as 98b4f53d15 and reported its application to master and PostgreSQL 16 in #8, while deferring the older overflow problem.
- Michael recommended waiting for PostgreSQL 18 development in #9; Peter then requested clearer overflow error wording and attached a separate, broader atol() audit in #10, which prompted discussion of portable frontend integer conversion in #11.
- Erik resubmitted the remaining overflow fix with clearer diagnostics and corrected declaration placement in #12, while identifying two unrelated scanner cleanups for separate discussion.
- Alexander Lakhin confirmed that the overflow fix worked but reported an excessive-allocation error for a large parameter number in #13; Erik responded with an additional MaxAllocSize-based bound check and boundary test in #14.
- jian he questioned the bound-check diagnostic in #15, Erik proposed a range hint in #16, and Tom argued for a much smaller protocol-based limit in #17; Erik's experiments in #18 also exposed stack-depth limits in large parameter expressions.
- Peter landed the overflow portion of #14 as d35cd06199, adding a local ECPG conversion variable before error checking, as explained in #19.
- Peter also landed the allocation-limit portion of #14 as 9c2e660b07, preserving its code and tests while correcting a commit-message typo, as reported in #19.
- Peter subsequently removed the allocation-limit test because it exhausted memory on buildfarm machines in #21; after Erik questioned the failures in #22, Tom explained that the valid boundary parameter itself required roughly a gigabyte of memory in #24.
- Tom renewed the proposal for a 65535 protocol-based limit in #23, but Peter kept that broader redesign separate in #25, explaining that the committed check prevents invalid allocation sizes without guaranteeing available physical memory.
- By the final message, the three targeted fixes had landed and the memory-heavy test had been removed; Erik acknowledged the test's allocation ordering in #26, while the broader atol() audit and parameter-limit redesign remained unresolved in this thread.