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

During index creation, GetDefaultOpClass() returns array_ops for a
int2vector index column, because type int2vector is binary-coercible with
anyarray (which is array_ops's input type).  Whereas queries involving
int2vector columns would use a int2vector_ops operator.

I wonder if the index creation command should rather fail because an index
thus created will never get used?  Or is_indexable_operator() should
somehow consider the fact that such indexes could in fact exist?

I might be missing something though.


Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to