pgsql: Make initdb behave sanely when the selected locale has codeset

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Make initdb behave sanely when the selected locale has codeset
Дата
Msg-id 20091112024616.7A1CF753FB7@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Make initdb behave sanely when the selected locale has codeset "US-ASCII".
Per discussion, this should result in defaulting to SQL_ASCII encoding.
The original coding could not support that because it conflated selection
of SQL_ASCII encoding with not being able to determine the encoding.
Adjust pg_get_encoding_from_locale()'s API to distinguish these cases,
and fix callers appropriately.  Only initdb actually changes behavior,
since the other callers were perfectly content to consider these cases
equivalent.

Per bug #5178 from Boh Yap.  Not going to bother back-patching, since
no one has complained before and there's an easy workaround (namely,
specify the encoding you want).

Modified Files:
--------------
    pgsql/src/backend/commands:
        dbcommands.c (r1.227 -> r1.228)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/dbcommands.c?r1=1.227&r2=1.228)
    pgsql/src/backend/utils/mb:
        mbutils.c (r1.91 -> r1.92)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/mbutils.c?r1=1.91&r2=1.92)
    pgsql/src/bin/initdb:
        initdb.c (r1.175 -> r1.176)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/initdb/initdb.c?r1=1.175&r2=1.176)
    pgsql/src/port:
        chklocale.c (r1.11 -> r1.12)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/port/chklocale.c?r1=1.11&r2=1.12)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Remove pg_parse_string_token() --- not needed anymore.
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Check for C/POSIX before assuming that nl_langinfo or