Re: Add GiST support for mixed-width integer operators

Поиск
Список
Период
Сортировка
От Andrey M. Borodin
Тема Re: Add GiST support for mixed-width integer operators
Дата
Msg-id 8A2355DE-A969-4CAB-B660-C7464EE3B899@yandex-team.ru
обсуждение исходный текст
Ответ на Add GiST support for mixed-width integer operators  (Paul Jungwirth <pj@illuminatedcomputing.com>)
Ответы Re: Add GiST support for mixed-width integer operators
Список pgsql-hackers

> On 5 Jul 2024, at 23:46, Paul Jungwirth <pj@illuminatedcomputing.com> wrote:
>
> this commit adds support for all combinations of int2/int4/int8 for all five btree operators (</<=/=/>=/>).

Looks like a nice feature to have.
Would it make sense to do something similar to float8? Or, perhaps, some other types from btree_gist?

Also, are we sure such tests will be stable?
+SET enable_seqscan=on;
+-- It should use the index with a different integer width:
+EXPLAIN (COSTS OFF)
+SELECT count(*) FROM int4tmp WHERE a = smallint '42';
+                   QUERY PLAN
+------------------------------------------------
+ Aggregate
+   ->  Bitmap Heap Scan on int4tmp
+         Recheck Cond: (a = '42'::smallint)
+         ->  Bitmap Index Scan on int4idx
+               Index Cond: (a = '42'::smallint)


Best regards, Andrey Borodin.


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