Systems with invalid locales

Adam Conrad adconrad at
Thu Jun 6 23:46:40 UTC 2013

On Thu, Jun 06, 2013 at 04:42:31PM +0200, Martin Pitt wrote:
> But in that case there is nothing else that PostgreSQL could use,
> except perhaps for saying that "if I have a locale defined by the
> environment, but it's not in /etc/default/locale, /etc/environment,
> /etc/postgresql/version/cluster/environment, ~/.profile,
> ~/.pam_profile, or whereever else you could set environment variables,
> then use C", but that would make things even less predictable and
> robust IMHO.

Or just set LANG=C.UTF-8 in your postinst and have it always work, and
completely ignore system and user locales.  Having the creation of the
template databases be subtly different based on the locale dpkg is run
under seems pretty unpredictably unintuitive to me.

This is entirely unrelated to my suggestion that /etc/default/locale
should also be set to C.UTF-8 for any system that hasn't had installer
intervention, which I also feel is The Right Thing, going forward.

... Adam

More information about the ubuntu-devel mailing list