From: "Greg Stark" <stark@mit.edu>
> Wait, why does the ctype of the database affect the ctype of the
> messages? Shouldn't these be two separate things? One describes the
> character set being used to store data in the database and the other
> the character set the log file and clients are in.
At session start, PostgreSQL sets the ctype of the database to be the
process's LC_CTYPE locale category in src/backend/utils/init/postinit.c:
ctype = NameStr(dbform->datctype);
...if (pg_perm_setlocale(LC_CTYPE, ctype) == NULL)
The LC_CTYPE locale category determines the character encoding for messages
obtained by gettext(). This is gettext()'s specification.
Regards
MauMau