Mathieu Fenniak wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      4436
> Logged by:          Mathieu Fenniak
> Email address:      [EMAIL PROTECTED]
> PostgreSQL version: 8.3.3
> Operating system:   Linux x86-64
> Description:        (E'\\' LIKE E'\\') => f
> Details: 
> 
> I noticed that (SELECT E'\\' LIKE E'\\') returns false, where I would expect
> it to return true.  I asked on the #postgresql/freenode IRC channel, and
> nobody had a good explanation for this return value, suggesting it may be a
> minor bug.

I believe this is caused because backslash is the default escape
character for LIKE, so you need:
        
        test=> SELECT E'\\' LIKE E'\\\\';
         ?column?
        ----------
         t
        (1 row)
        
or change the escape character:
        
        test=> SELECT E'\\' LIKE E'\\' escape 'a';
         ?column?
        ----------
         t
        (1 row)

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

-- 
Sent via pgsql-bugs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to