Re: Add GiST support for mixed-width integer operators - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: Add GiST support for mixed-width integer operators
Date
Msg-id 8A2355DE-A969-4CAB-B660-C7464EE3B899@yandex-team.ru
Whole thread Raw
In response to Add GiST support for mixed-width integer operators  (Paul Jungwirth <pj@illuminatedcomputing.com>)
Responses Re: Add GiST support for mixed-width integer operators
List 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 by date:

Previous
From: Erik Wienhold
Date:
Subject: Re: XML test error on Arch Linux
Next
From: Bertrand Drouvot
Date:
Subject: Re: walsender.c comment with no context is hard to understand