[Pkg-postgresql-public] Locale sanitizing [was: Re: Changing default encoding to unicode?]

Martin Pitt mpitt@debian.org
Sun, 7 Nov 2004 21:22:26 +0100


--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Peter!

Thanks for your answer, I think this also solves the question I sent
you by private mail.

Peter Eisentraut [2004-11-07 18:38 +0100]:
> The database encoding has to be set to match the locale (or vice versa). =
=20
> For example:
>=20
> locale de_DE       --> encoding LATIN1
> locale de_DE@euro  --> encoding LATIN9
> locale de_DE.utf8  --> encoding UNICODE
>=20
> initdb in PostgreSQL 8.0 will automatically pick the encoding to match=20
> the locale=20

According to initdb's manpage (of version 7.4), both the server locale
and the default database encoding should default to the locale initdb
runs under. So is this right?

> I don't know if you're still thinking about 7.4.*.  If so, it may be=20
> worth backporting that logic.

I think we should greatly simplify the locale handling in the current
packages, which would also make backporting unnecessary. I would like
to completely drop the db default encoding question, and instead
modify the locale question so that it explains that the encoding of
the chosen locale will become the default database encoding. The
default locale of this question should be the locale which the
postgres user normally runs under, not 'C'.

Then the user can safely accept the default, it will do the right
thing on most systems. If he chooses another locale, then the
postgresql-startup script has just to select this choosen locale for
the postmaster process.

This should simplify the installation process and also fix all these
nasty locale bugs, right?

Thanks,

Martin

--=20
Martin Pitt                       http://www.piware.de
Ubuntu Developer            http://www.ubuntulinux.org
Debian GNU/Linux Developer       http://www.debian.org

--7JfCtLOvnd9MIVvH
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBjoQCDecnbV4Fd/IRAun/AJsGaoaBRLWTP+uL9tePsk8eT/IhfgCfR+If
hXbC7bYExUn+InBjCX8SCNY=
=GeCo
-----END PGP SIGNATURE-----

--7JfCtLOvnd9MIVvH--