Need to use pg_perm_setlocale when setting LC_CTYPE and LC_COLLATE at startup.
commit4098b75b7d8610c595f712e39650156b244c368c
authorheikki <heikki>
Wed, 8 Jul 2009 17:53:29 +0000 (8 17:53 +0000)
committerheikki <heikki>
Wed, 8 Jul 2009 17:53:29 +0000 (8 17:53 +0000)
tree0fb4ceb6575ea38fc3587e6c000fbce5fa73f31c
parent7e700e75eeb8c8e1a506f819bc1ee0acc9a07a3c
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