Re: Index usage for elem-contained-by-const-range clauses

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pritam Baral <pritam(at)pritambaral(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Index usage for elem-contained-by-const-range clauses
Date: 2017-03-17 21:06:42
Message-ID: 30347.1489784802@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pritam Baral 2017-03-17 21:33:21 Re: Index usage for elem-contained-by-const-range clauses
Previous Message Tom Lane 2017-03-17 20:56:01 Re: increasing the default WAL segment size