The following SQL succeeds:
create database foodb with
template = template0
encoding = 'UTF8'
lc_collate=''
lc_ctype='';
(any other template fails because it actually checks for a match against
the template).
The problem seems to be in check_locale(), which just checks for a
non-NULL return value from setlocale(). However, the manual for
setlocale() says:
If locale is "", each part of the locale that should be modified
is set according to the environment variables. The details
are implementation-dependent.
Surely we don't want it to be set from the environment, right?
Regards,
Jeff Davis