| От | Tom Lane |
|---|---|
| Тема | Re: BUG #18870: weird behavior with regexp_replace |
| Дата | |
| Msg-id | 2153095.1743110638@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #18870: weird behavior with regexp_replace (PG Bug reporting form <noreply@postgresql.org>) |
| Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes:
> select regexp_replace(LOWER('Örebro'), '\W', '_', 'g') in postgres 15 the
> result is örebro which is correct since ö should fit in the \w for a
> regex.
> select regexp_replace(LOWER('Örebro'), '\W', '_', 'g') --> since postgres 17
> the result is _rebro which is incorrect since \w should also contain
> characters like ö, ä, ë.
This most likely indicates that you've got a different database
collation selected in the v17 installation. Postgres defers to
the LC_CTYPE setting (or, in some configurations, the ICU collation)
to decide what is a letter. See
https://www.postgresql.org/docs/current/charset.html
psql's "\l" command will give a quick overview of what collations
you have selected.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера