Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hubert depesz lubaczewski <depesz@xxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux