From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | int2vector and btree indexes |
Date: | 2016-10-11 06:58:09 |
Message-ID: | d9bb74f8-b194-7307-9ebd-90645d377e45@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 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.
Thanks,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Torsten Zuehlsdorff | 2016-10-11 07:08:21 | Re: kqueue |
Previous Message | Michael Paquier | 2016-10-11 06:50:58 | Re: Forbid use of LF and CR characters in database and role names |