Re: Backslashes in data in version 8.1.2

Поиск
Список
Период
Сортировка
От Mike Nolan
Тема Re: Backslashes in data in version 8.1.2
Дата
Msg-id 200602192307.k1JN7fv6024758@gw.tssi.com
обсуждение исходный текст
Ответ на Re: Backslashes in data in version 8.1.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> This has not changed from prior versions.  It looks like you are
> neglecting to allow for the fact that backslash is an escape character
> both at the string-literal level and at the regex-pattern level.
> Therefore you must write twice as many backslashes as you normally
> would write in a regex pattern.  In particular, '\\\\' to match a
> literal backslash.

Something must have changed, Tom, because neither of the following work
on the system where I now have 8.1.2 but do work on another system
running 7.4.5, and in both 8.0.2 and 8.1.2 on a third system:

select * from backtest where field ~ '\\\\';
field
-------
(0 rows)

select * from backtest where field like '%\\\\%';
field
-------
(0 rows)

Could this be a locale issue?  The one where it does not work uses the C
locale, the others use the default locale, en_US.UTF-8.
--
Mike Nolan

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Backslashes in data in version 8.1.2
Следующее
От: Mike Nolan
Дата:
Сообщение: Re: Backslashes in data in version 8.1.2