Re: text_pattern_ops index *not* used in field = value condition?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: depesz(at)depesz(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: text_pattern_ops index *not* used in field = value condition?
Date: 2007-09-15 15:09:39
Message-ID: 26023.1189868979@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hubert depesz lubaczewski <depesz(at)depesz(dot)com> writes:
> index is created using text_pattern_ops so i will be able to use it in 'where word like '...%''
> but, it appears it is not usable with = operator:

= is not one of the members of the text_pattern_ops operator class.

regression=# select amopopr::regoperator from pg_amop where amopclaid in (select oid from pg_opclass where opcname = 'text_pattern_ops');
amopopr
-----------------
~<~(text,text)
~<=~(text,text)
~=~(text,text)
~>=~(text,text)
~>~(text,text)
~=~(text,text)
(6 rows)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2007-09-15 15:12:29 Re: text_pattern_ops index *not* used in field = value condition?
Previous Message hubert depesz lubaczewski 2007-09-15 14:48:26 text_pattern_ops index *not* used in field = value condition?