Re: Overloaded && operator from intarray module prevents index usage.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Overloaded && operator from intarray module prevents index usage.
Дата
Msg-id 10517.1551372290@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Overloaded && operator from intarray module prevents index usage.  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: Overloaded && operator from intarray module prevents index usage.  (Michael Lewis <mlewis@entrata.com>)
Список pgsql-general
Thomas Kellerer <spam_eater@gmx.net> writes:
> While testing a query on an integer array with a GIN index, I stumbled over a behaviour which surprised me and which
Iwould consider a bug - but maybe I am wrong.  

It's not a bug --- the problem is that that operator is capturing your
query reference, and it's not a member of the opclass for the index
you have, so no index scan for you.

> The above happens even if the intarray extension is a the end of the search path, e.g. "set search_path = public,
intarray".

Yeah, because it's an exact datatype match while the core operator
is anyarray && anyarray which is not.

Ideally, perhaps, the extension could add its operator to the core
gin-arrays opclass, but we lack any reasonable way to manage that.

Something that's maybe more likely to happen is to remove that
operator from the extension altogether; but that will break things
for some people too, no doubt :-(

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: automated refresh of dev from prod
Следующее
От: Raymond Brinzer
Дата:
Сообщение: Re: Where **not** to use PostgreSQL?