Need to use pg_perm_setlocale when setting LC_CTYPE and LC_COLLATE at startup.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: e5bb0f04db225a06e08b9b74cde82325c87a8de3
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2009-07-08T17:53:29Z
Releases: 9.0.0
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.

Files

PathChange+/−
src/backend/utils/init/postinit.c modified +4 −3