Incremental Update: Tom Lane Rejects Patch Due to Platform Portability Concerns
Summary
Tom Lane has responded to the patch with a clear rejection rationale based on cross-platform locale name variability — the exact concern anticipated in the prior analysis, but now articulated with concrete historical evidence from the buildfarm.
Key Technical Argument
Tom Lane explains that the fundamental reason this test doesn't already exist is locale name spelling and availability varies across platforms. The proposed test hardcodes en_US.UTF-8, which:
- May not exist on all buildfarm machines
- May produce a different error message than expected (e.g., "locale not found" instead of the encoding mismatch error)
He provides a specific historical parallel: his own attempts to add NLS translation coverage, referencing six commits that document the painful iteration cycle:
8c498479d→5b275a6e1→fe7ede45f→7db6809ce→84a3778c7→462e24765
This series demonstrates that even experienced committers underestimate the portability challenges of locale-dependent tests.
Proposed Alternative (Dismissed)
Tom acknowledges that variant expected-output files (the .out alternate mechanism in pg_regress) could theoretically handle the platform differences, but dismisses this approach as:
- "A pain in the rear for maintenance"
- Questionable in what it would actually prove — if you need N variant files for N platform behaviors, the test's value as a regression guard diminishes
Implications
This effectively closes the patch unless the author can propose an approach that avoids locale-name dependency. Possible paths forward (not suggested by Tom, but implied by the discussion):
- Using TAP tests with platform detection logic
- Finding a locale guaranteed to exist (unlikely to exist universally)
- Testing via
builtinlocale provider (PG17+) which doesn't depend on OS locale availability - Testing at a lower level (e.g.,
check_encoding_locale_matches()unit test)
The tone of the response is definitive — Tom is not asking for a revision but explaining why the approach is fundamentally problematic.