pgsql: Use a non-locale-dependent definition of isspace() in

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Use a non-locale-dependent definition of isspace() in
Дата
Msg-id 20100821165558.D3FC57541D7@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Use a non-locale-dependent definition of isspace() in array_in/array_out.

array_in discards unquoted leading and trailing whitespace in array values,
while array_out is careful to quote array elements that contain whitespace.
This is problematic when the definition of "whitespace" varies between
locales: array_in could drop characters that were meant to be part of the
value.  To avoid that, lock down "whitespace" to mean only the traditional
six ASCII space characters.

This change also works around a bug in OS X and some older BSD systems, in
which isspace() could return true for character fragments in UTF8 locales.
(There may be other places in PG where that bug could cause problems, but
this is the only one complained of so far; see recent report from Steven
Schlansker.)

Back-patch to 9.0, but not further.  Given the lack of previous reports
of trouble, changing this behavior in stable branches seems to offer
more risk of breaking applications than reward of avoiding problems.

Tags:
----
REL9_0_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        arrayfuncs.c (r1.164.4.1 -> r1.164.4.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/arrayfuncs.c?r1=1.164.4.1&r2=1.164.4.2)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Use a non-locale-dependent definition of isspace() in
Следующее
От: momjian@postgresql.org (Bruce Momjian)
Дата:
Сообщение: pgsql: Document that autovacuum_freeze_max_age is used for pg_clog