Re: Docs off on ILIKE indexing?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Docs off on ILIKE indexing?
Date: 2006-01-16 18:03:20
Message-ID: 9942.1137434600@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> http://www.postgresql.org/docs/8.1/static/indexes-types.html
> says:
> The optimizer can also use a B-tree index for queries involving the
> pattern matching operators LIKE, ILIKE, ~, and ~*, if the pattern is a
> constant and is anchored to the beginning of the string - for example,
> col LIKE 'foo%' or col ~ '^foo', but not col LIKE '%bar'.

> But really, does it use indexes for ILIKE?

That's pretty poorly phrased. For ILIKE it'll only work if there's a
prefix of the pattern that's not letters (and hence is unaffected by
the case-folding issue).

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Hallgren 2006-01-16 18:21:52 Re: source documentation tool doxygen
Previous Message Tom Lane 2006-01-16 17:57:46 Re: [PATCH] Better way to check for getaddrinfo function.