From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Be forgiving of variant spellings of locale names in pg_upgrade. |
Date: | 2014-01-31 00:07:13 |
Message-ID: | E1W91dZ-0002q4-O2@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Be forgiving of variant spellings of locale names in pg_upgrade.
Even though the server tries to canonicalize stored locale names, the
platform often doesn't cooperate, so it's entirely possible that one DB
thinks its locale is, say, "en_US.UTF-8" while the other has "en_US.utf8".
Rather than failing, we should try to allow this where it's clearly OK.
There is already pretty robust encoding lookup in encnames.c, so make
use of that to compare the encoding parts of the names. The locale
identifier parts are just compared case-insensitively, which we were
already doing. The major problem known to exist in the field is variant
encoding-name spellings, so hopefully this will be Good Enough. If not,
we can try being even laxer.
Pavel Raiskup, reviewed by Rushabh Lathia
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/58274728fb8e087049df67c0eee903d9743fdeda
Modified Files
--------------
contrib/pg_upgrade/check.c | 82 +++++++++++++++++++++++++++++++++++++-------
1 file changed, 69 insertions(+), 13 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2014-01-31 03:40:11 | pgsql: pgindent: preserve blank lines around #else/#endif |
Previous Message | Tom Lane | 2014-01-30 23:10:44 | pgsql: Fix potential coredump on bad locale value in pg_upgrade. |