Re: ILIKE

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Vince Vielhaber <vev(at)michvhf(dot)com>
Cc: Justin Clift <justin(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ILIKE
Date: 2003-02-24 18:39:15
Message-ID: 200302241039.15612.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Four Reasons to use ILIKE, which have nothing to do with mSQL:

1) It's faster to type than most analagous regexp comparisons, and much faster
than comparing two LOWERs or two UPPERS.

2) It's a great operator for comparing two text variables or columns of small
tables where you don't want to worry about escaping the many items of regexp
punctuation.

3) It's an easy search-and-replace operator for porting applications from SQL
databases which automatically do case-insensitive comparisons using LIKE,
such as MySQL and some installations of MSSQL.

4) It's just as indexible (or not indexable) as regexp comparisons, and easier
to understand for users from the Microsoft world than regexp.

And, on a quick search, one of my applications uses ILIKE 21 times in the
built in functions and views.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

  • Re: ILIKE at 2003-02-24 19:19:34 from Peter Eisentraut

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-02-24 19:16:29 More outdated examples
Previous Message Dave Cramer 2003-02-24 18:36:27 Re: request for sql3 compliance for the update command