Re: BUG #6232: hstore operator ? no longer uses indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Pierre Ducroquet <p(dot)psql(at)pinaraf(dot)info>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6232: hstore operator ? no longer uses indexes
Date: 2011-09-29 04:08:14
Message-ID: 18821.1317269294@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Greg Stark <stark(at)mit(dot)edu> writes:
> On Thu, Sep 29, 2011 at 4:22 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>>> Not sure what to do about this. Is it okay to suppose that collation
>>> can be ignored when matching to a collation-less index?

>> That sounds correct on first reading.

> Doesn't this depend on the semantics of the ? operator?

Well, yeah. But if the operator requires a particular collation, what's
it doing in an operator class for a collation-less indexed datatype?

I think the operator could actually depend on its input collation with
respect to some part of the processing it does on its collatable
right-hand input. But if the left-hand column (the indexed column) is
of a non-collatable type, it's hard to see how the operator could depend
on the index having a collation.

Also, I've now tested a patch along these lines and it passes core and
contrib regression tests, so there's not anything too obviously broken
about the idea.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Craig Ringer 2011-09-29 07:44:37 Re: BUG #5800: "corrupted" error messages (encoding problem ?)
Previous Message Greg Stark 2011-09-29 04:00:45 Re: BUG #6232: hstore operator ? no longer uses indexes