Re: [HACKERS] int2vector and btree indexes

2016-10-12 Thread Tom Lane
Amit Langote writes: > On 2016/10/11 21:40, Tom Lane wrote: >> Hmm ... I kind of wonder why we have int2vectoreq or hashint2vector at >> all, likewise the hash opclass based on them. > Agreed. So how about the attached patch to remove the said infrastructure?

Re: [HACKERS] int2vector and btree indexes

2016-10-11 Thread Amit Langote
On 2016/10/11 21:40, Tom Lane wrote: > Amit Langote writes: >> I was wrong that the index *never* gets used. It does in fact get used if >> the operator is an ordering search operator (<, <=, >, >=), in which case >> the query would use an array_ops operator (which

Re: [HACKERS] int2vector and btree indexes

2016-10-11 Thread Tom Lane
Amit Langote writes: > I was wrong that the index *never* gets used. It does in fact get used if > the operator is an ordering search operator (<, <=, >, >=), in which case > the query would use an array_ops operator (which is a btree operator class > for type

Re: [HACKERS] int2vector and btree indexes

2016-10-11 Thread Amit Langote
On 2016/10/11 15:58, Amit Langote wrote: > If I create btree index on a int2vector column, it does not get used for > queries because the query search always fails to match the index operator > (family). > > During index creation, GetDefaultOpClass() returns array_ops for a > int2vector index