Re: BUG #17584: SQL crashes PostgreSQL when using ICU collation

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: BUG #17584: SQL crashes PostgreSQL when using ICU collation
Дата
Msg-id CAH2-Wzmqrjqv9pgyzebgnqmcac1Ct+UxG3VQU7kSVUNDf_yF2A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17584: SQL crashes PostgreSQL when using ICU collation  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #17584: SQL crashes PostgreSQL when using ICU collation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Sat, Aug 13, 2022 at 11:15 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> says that only the "if (sss->collate_c)" path in varstr_abbrev_convert
> gets exercised in our regression tests.  I thought maybe that just
> meant that the coverage.postgresql.org run uses C locale, but I see
> the same lack-of-coverage in a local test under LANG=en_US.utf8.
> How can we only be reaching this function with sss->collate_c true
> when the prevailing locale isn't that?

We don't trust libc's strxfrm() following the debacle with
locale-aware abbreviated keys back in 2016 (unless the user builds
their own Postgres, and goes out of their way to #define
TRUST_STRXFRM). So the relevant strxfrm() code is arguably dead code.

ICU is different: our policy with ICU locales has always been to trust
ICU's strxfrm()-like function to agree with ICU's strcoll()-like
function.

-- 
Peter Geoghegan



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17584: SQL crashes PostgreSQL when using ICU collation
Следующее
От: Noah Misch
Дата:
Сообщение: Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV