Search Postgresql Archives

Re: Backslashes in data in version 8.1.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux