Re: = or LIKE ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jesper Krogh <jesper(at)krogh(dot)cc>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: = or LIKE ?
Date: 2009-02-15 18:42:40
Message-ID: 23452.1234723360@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Jesper Krogh <jesper(at)krogh(dot)cc> writes:
> Shouldnt the like operator do the same as the = if there occours no
> wildcards and stuff in the string?

If there are also no escape characters, then yeah.

FWIW, 8.4 will complain about this case:

regression=# select E'\\' like E'\\';
ERROR: LIKE pattern must not end with escape character

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jesper Krogh 2009-02-15 19:20:18 Re: = or LIKE ?
Previous Message Jesper Krogh 2009-02-15 17:57:59 = or LIKE ?