On 12-Nov-07, at 11:37 AM, Tom Lane wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> Well, AFAIK the index with varchar_pattern_ops is used for LIKE
>> queries,
>> whereas the other one is going to be used for = queries. So you
>> need to
>> keep both indexes.
>
> Given the current definition of text equality, it'd be possible to
> drop
> ~=~ and have the standard = operator holding the place of equality in
> both the regular and pattern_ops opclasses. Then it'd be possible to
> support regular equality queries, as well as LIKE, with only the
> pattern_ops index.
>
That would be ideal. Having two indexes on the same column isn't
optimal.
Dave