Re: text_pattern_ops index *not* used in field = value condition?
| От | Tom Lane |
|---|---|
| Тема | Re: text_pattern_ops index *not* used in field = value condition? |
| Дата | |
| Msg-id | 26428.1189871299@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: text_pattern_ops index *not* used in field = value condition? (hubert depesz lubaczewski <depesz@depesz.com>) |
| Ответы |
Re: text_pattern_ops index *not* used in field = value condition?
|
| Список | pgsql-general |
hubert depesz lubaczewski <depesz@depesz.com> writes:
> On Sat, Sep 15, 2007 at 11:09:39AM -0400, Tom Lane wrote:
>> = is not one of the members of the text_pattern_ops operator class.
> ok, but is there any reason for this?
Well, at the time those opclasses were invented, the regular = operator
didn't necessarily yield the same result --- in some locales strcoll()
can return "equal" for not-bitwise-equal strings.
As of a couple years ago, the regular text = operator only yields true
for bitwise-equal strings, so we could perhaps drop ~=~ and use = in its
place. But I'd be worried about breaking existing queries that expect
the strangely-named operator to be there.
The operator class structure only permits one equality operator per
opclass, so supporting both is not feasible.
regards, tom lane
В списке pgsql-general по дате отправления: