pgsql: Make the locale comparison in pg_upgrade more lenient

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Make the locale comparison in pg_upgrade more lenient
Дата
Msg-id E1XhjKc-0003Zl-9W@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Make the locale comparison in pg_upgrade more lenient  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-committers
Make the locale comparison in pg_upgrade more lenient

If the locale names are not equal, try to canonicalize both of them by
passing them to setlocale(). Before, we only canonicalized the old cluster's
locale if upgrading from a 8.4-9.2 server, but we also need to canonicalize
when upgrading from a pre-8.4 server. That was an oversight in the code. But
we should also canonicalize on newer server versions, so that we cope if the
canonical form changes from one release to another. I'm about to do just
that to fix bug #11431, by mapping a locale name that contains non-ASCII
characters to a pure-ASCII alias of the same locale.

This is partial backpatch of commit 33755e8edf149dabfc0ed9b697a84f70b0cca0de
in master. Apply to 9.2, 9.3 and 9.4. The canonicalization code didn't exist
before 9.2. In 9.2 and 9.3, this effectively also back-patches the changes
from commit 58274728fb8e087049df67c0eee903d9743fdeda, to be more lax about
the spelling of the encoding in the locale names.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/2a1b34959a25d5b395ba52101eccf28a8e189c10

Modified Files
--------------
contrib/pg_upgrade/check.c |  112 +++++++++++++++++++++++++++++++-------------
1 file changed, 80 insertions(+), 32 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Make the locale comparison in pg_upgrade more lenient
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Work around Windows locale name with non-ASCII character.