From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: int2vector and btree indexes
Date: Tue, 11 Oct 2016 15:58:09 +0900
Message-ID: <d9bb74f8-b194-7307-9ebd-90645d377e45@lab.ntt.co.jp> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: Langote_Amit_f8@lab.ntt.co.jp
Subject: Re: int2vector and btree indexes
In-Reply-To: <d9bb74f8-b194-7307-9ebd-90645d377e45@lab.ntt.co.jp>
References: <d9bb74f8-b194-7307-9ebd-90645d377e45@lab.ntt.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox