= or LIKE ?

From: Jesper Krogh <jesper(at)krogh(dot)cc>
To: pgsql-sql(at)postgresql(dot)org
Subject: = or LIKE ?
Date: 2009-02-15 17:57:59
Message-ID: 499857A7.4000201@krogh.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi.

Can anyone explain me this behavior?

testdb=# select E'\\' = E'\\';
?column?
----------
t
(1 row)

testdb=# select E'\\' like E'\\';
?column?
----------
f
(1 row)

Shouldnt the like operator do the same as the = if there occours no
wildcards and stuff in the string?

--
Jesper

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2009-02-15 18:42:40 Re: = or LIKE ?
Previous Message Tovo Rabemanantsoa 2009-02-13 13:18:24 Re: Grass Root Protectionism