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

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 35863c9557085d0a116ffb48dc371efe18b85fea
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2009-07-08T17:53:32Z
Releases: 8.4.1
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