| От | Andrew Gierth |
|---|---|
| Тема | Re: BUG #15069: group by after regexp_replace |
| Дата | |
| Msg-id | 87fu62qngv.fsf@news-spur.riddles.org.uk обсуждение исходный текст |
| Ответ на | BUG #15069: group by after regexp_replace (PG Bug reporting form <noreply@postgresql.org>) |
| Список | pgsql-bugs |
>>>>> "PG" == PG Bug reporting form <noreply@postgresql.org> writes: PG> select upper(regexp_replace(a, '\\s+', '')) as keyword This regexp doesn't do what you seem to be expecting. With standard_conforming_strings enabled, which is the default, \ is not a special character to the string literal parser, so the regexp engine is seeing a regexp of \\s+ which means "match the literal character \ followed by one or more lowercase "s" characters". Accordingly the regexp never matches on your input. To remove whitespace use '\s+' or E'\\s+' or '[[:space:]]+' -- Andrew (irc:RhodiumToad)
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера