Re: = or LIKE ?

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Jesper Krogh <jesper(at)krogh(dot)cc>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-sql(at)postgresql(dot)org
Subject: Re: = or LIKE ?
Date: 2009-02-16 04:40:30
Message-ID: 4998EE3E.6050404@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Jesper Krogh wrote:

> So I cannot rely on the like operator to behave correct if I'd like to
> compare strings with backslashes (e.g. filepaths from MS Windows
> filesystems)?

test=# SELECT E'\\' LIKE E'\\' ESCAPE '';
?column?
----------
t
(1 row)

--
Craig Ringer

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message John Lister 2009-02-16 11:00:51 temp tables versus normal tables
Previous Message Tom Lane 2009-02-15 19:34:58 Re: = or LIKE ?