]> granicus.if.org Git - postgresql/commit
Always set the six locale category environment variables in main().
authorNoah Misch <noah@leadboat.com>
Thu, 8 Jan 2015 03:34:57 +0000 (22:34 -0500)
committerNoah Misch <noah@leadboat.com>
Thu, 8 Jan 2015 03:35:14 +0000 (22:35 -0500)
commit603eb79210da599b7b535afa7b2e53a2380a4cdf
treef1f066ca2d87cd57a7b5b4fc5620792e4a88264b
parente045052863a4517b11ffab0ae9a92160280d49ea
Always set the six locale category environment variables in main().

Typical server invocations already achieved that.  Invalid locale
settings in the initial postmaster environment interfered, as could
malloc() failure.  Setting "LC_MESSAGES=pt_BR.utf8 LC_ALL=invalid" in
the postmaster environment will now choose C-locale messages, not
Brazilian Portuguese messages.  Most localized programs, including all
PostgreSQL frontend executables, do likewise.  Users are unlikely to
observe changes involving locale categories other than LC_MESSAGES.
CheckMyDatabase() ensures that we successfully set LC_COLLATE and
LC_CTYPE; main() sets the remaining three categories to locale "C",
which almost cannot fail.  Back-patch to 9.0 (all supported versions).
src/backend/main/main.c