pgsql: Fix up handling of C/POSIX collations.
От | Tom Lane |
---|---|
Тема | pgsql: Fix up handling of C/POSIX collations. |
Дата | |
Msg-id | E1Q1Ljt-000473-Oi@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Fix up handling of C/POSIX collations. Install just one instance of the "C" and "POSIX" collations into pg_collation, rather than one per encoding. Make these instances exist and do something useful even in machines without locale_t support: to wit, it's now possible to force comparisons and case-folding functions to use C locale in an otherwise non-C database, whether or not the platform has support for using any additional collations. Fix up severely broken upper/lower/initcap functions, too: the C/POSIX fastpath now does what it is supposed to, and non-default collations are handled correctly in single-byte database encodings. Merge the two separate collation hashtables that were being maintained in pg_locale.c, and be more wary of the possibility that we fail partway through filling a cache entry. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/176d5bae1d636fc1e91840b12cbd04c96d638b7e Modified Files -------------- doc/src/sgml/charset.sgml | 140 ++++++++--- src/backend/utils/adt/formatting.c | 163 ++++++++++-- src/backend/utils/adt/pg_locale.c | 488 ++++++++++++++++++++---------------- src/bin/initdb/initdb.c | 18 +- src/include/catalog/catversion.h | 2 +- src/include/catalog/pg_collation.h | 15 +- src/include/port.h | 2 + src/port/pgstrcasecmp.c | 26 ++ 8 files changed, 572 insertions(+), 282 deletions(-)
В списке pgsql-committers по дате отправления: