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:48:19 |
Message-ID: | 26428.1189871299@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:
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2007-09-15 16:21:34 | Re: text_pattern_ops index *not* used in field = value condition? |
Previous Message | hubert depesz lubaczewski | 2007-09-15 15:12:29 | Re: text_pattern_ops index *not* used in field = value condition? |