Need to use pg_perm_setlocale when setting LC_CTYPE and LC_COLLATE at startup.
authorHeikki Linnakangas <heikki@enterprisedb.com>
Wed, 8 Jul 2009 17:53:29 +0000 (17:53 +0000)
committerHeikki Linnakangas <heikki@enterprisedb.com>
Wed, 8 Jul 2009 17:53:29 +0000 (17:53 +0000)
commit4e766f1cd94a1193b747a796ddd2d31db9a51197
tree76c2bd3785fb2e052441fcda01786baef36167e6
parent7bc0f82c36cad50789cc3c242dd0448e496bd006
Need to use pg_perm_setlocale when setting LC_CTYPE and LC_COLLATE at startup.
Otherwise, the LC_CTYPE/COLLATE setting gets reverted when using plperl, which
leads to incorrect query results and index corruption.

This was accidentally broken in the per-database locale patch in 8.4. Pointed
out by Andrew Gierth.
src/backend/utils/init/postinit.c