model-writtenrun 8440 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Apr - May 2020 · 18 entries
- Davinder Singh opened the thread with a fix for NLS-enabled Visual Studio 2015-and-later builds, replacing access to a missing CRT locale_name member with GetLocaleInfoEx after comparing its behavior with ResolveLocaleName #1; he clarified that enabling NLS was necessary to reproduce the compilation failure #3.
- Juan José Santamaría Flecha recommended simpler conditional compilation and a Windows-version guard that could also accommodate MinGW #4 #6, which Davinder incorporated through #7, while Ranier Vilela supplied initialization and C-locale cleanup changes in #10.
- Amit Kapila questioned whether direct GetLocaleInfoEx lookup covered all inputs accepted by _create_locale #11, leading Davinder to strip code-page suffixes and retain _create_locale for validation in #15 and #16.
- After Ranier identified a remaining failure-path leak #17, Juan removed preliminary locale creation and made GetLocaleInfoEx the complete replacement on the newer-Windows path #18.
- Amit demonstrated that direct lookup failed for valid names such as English_New Zealand and French_Canada, and supplied a separate CRT-declaration hack solely to compare the old implementation's behavior #20; that testing patch was not part of the eventual fix.
- Juan responded with an EnumSystemLocalesEx fallback that searched installed locales by language and country names #21, then added language-only and case-insensitive matching alongside broader test results #24.
- Juan's testing identified Windows-specific language and country aliases that would require a lookup table #24; the submitted solution retained enumeration without adding that table.
- Ranier corrected cleanup of failed locale creation but introduced an inappropriate wcslen call in #25, and Amit's subsequent tests exposed incorrect conversion input and missing enumeration-success detection #32 #33.
- Juan restored pg_mbstrlen and added diagnostics in #34, after which Amit restored NULL failure semantics, added explicit match-status propagation, and returned the compiler guard to _MSC_VER for consistency with existing code #37.
- Ranier simplified the callback in #38; Amit accepted those changes while rejecting an unrelated rewrite of the existing C-locale copy #40, and Juan incorporated the decisions with clearer comments, caller-side logging, and SQL comparison tests in #42.
- Amit polished the comments and requested wider locale and code-page testing in #47; Davinder's results showed matching error messages except for Portuguese_Brazil.1252, where the new logic correctly selected pt_BR and produced translated messages #48 #51.
- Juan prepared back-branch variants #49, but Amit found an unsafe failure path and worried that the growing conditional structure would complicate support for older compilers #56 #57.
- Amit proposed isolating only the Visual Studio 2015-and-later path in a helper while preserving older compiler paths #58 #60, and Juan supplied that revision with branch variants in #61.
- Amit corrected redundant locale creation and leaks in the branch variants #62, then aligned HEAD's helper definition with the back branches in #64 following Juan's consistency request #63.
- Juan reported no regressions in manual SQL tests #65, and Davinder verified the latest patches across the target PostgreSQL versions #66, after which Amit declared the work ready #67.
- Tom Lane explained that the planned push coincided with the stable-release quiet period #68 #71, so Amit delayed the commit until the release tags appeared #69 #72.
- Amit landed the final revision from #64 as a169155453 and backpatched through PostgreSQL 9.5, announcing the push in #74; the available discussion indicates no further code revisions, although the final attachment could not be compared directly.
- The thread ended with acknowledgments from Ranier and Juan #75 #76, with the compilation fix committed and no further patch revision pending in this thread.