Re: tiny step toward threading: reduce dependence on setlocale()
От | Peter Eisentraut |
---|---|
Тема | Re: tiny step toward threading: reduce dependence on setlocale() |
Дата | |
Msg-id | cfe99144-e1a3-458b-93c6-09b2eac1746e@eisentraut.org обсуждение исходный текст |
Ответ на | Re: tiny step toward threading: reduce dependence on setlocale() (Jeff Davis <pgsql@j-davis.com>) |
Ответы |
Re: tiny step toward threading: reduce dependence on setlocale()
|
Список | pgsql-hackers |
I'm wondering if after this patch series, lc_collate_is_c() and lc_ctype_is_c() are still useful. They used to be completely separate from pg_newlocale_from_collation(), but now they are just mostly a thin wrapper around it. Except there is some hardcoded handling of C_COLLATION_OID and POSIX_COLLATION_OID. Do we care about that? In many places, the notational and structural complexity would be significantly improved if we changed code like if (pg_collate_is_c(colloid)) { ... } else { pg_locale_t locale = pg_newlocale_from_collation(colloid); if (locale->provider == ...) { ... } to more like pg_locale_t locale = pg_newlocale_from_collation(colloid); if (locale->collate_is_c) { ... } else if (locale->provider == ...) ... } ... However, it's not clear whether the hardcoded handling of some collations is needed for performance parity or perhaps some bootstrapping reasons. It would be useful to get that cleared up. Thoughts?
В списке pgsql-hackers по дате отправления: