Re: [HACKERS] Index usage for elem-contained-by-const-range clauses - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Index usage for elem-contained-by-const-range clauses
Date
Msg-id 30347.1489784802@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Index usage for elem-contained-by-const-range clauses  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> * You're not bothering to insert any inputcollid into the generated
> comparison operator nodes.  I'm not sure why that fails to fall over
> for text comparisons (if indeed it does fail ...) but it's wrong.
> Use the range type's collation there.

Oh ... looking at this again, I realize that there's an additional
validity check missing: if the range type's collation doesn't match
the index column's collation, we can't do this optimization at all.
That check probably belongs in match_special_index_operator.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] increasing the default WAL segment size
Next
From: Pritam Baral
Date:
Subject: Re: [HACKERS] Index usage for elem-contained-by-const-range clauses