Add cross-type comparisons to contrib/btree_gin.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Jul 2025 20:24:31 +0000 (16:24 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Jul 2025 20:24:31 +0000 (16:24 -0400)
commite2b64fcef35f70f96fa92db56fbfa9ac2da136c7
tree35752a03406e9cf3b9edc1cdbe45fdbdf9e63f6d
parent0059bbe1ecaa5f7f19a8b3aae059f352c02e1d88
Add cross-type comparisons to contrib/btree_gin.

Extend the infrastructure in btree_gin.c to permit cross-type
operators, and add the code to support them for the int2, int4,
and int8 opclasses.  (To keep this patch digestible, I left
the other datatypes for a separate patch.)  This improves the
usability of btree_gin indexes by allowing them to support the
same set of queries that a regular btree index does.

Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>
Discussion: http://postgr.es/m/262624.1738460652@sss.pgh.pa.us
13 files changed:
contrib/btree_gin/Makefile
contrib/btree_gin/btree_gin--1.3--1.4.sql [new file with mode: 0644]
contrib/btree_gin/btree_gin.c
contrib/btree_gin/btree_gin.control
contrib/btree_gin/expected/int2.out
contrib/btree_gin/expected/int4.out
contrib/btree_gin/expected/int8.out
contrib/btree_gin/meson.build
contrib/btree_gin/sql/int2.sql
contrib/btree_gin/sql/int4.sql
contrib/btree_gin/sql/int8.sql
doc/src/sgml/gin.sgml
src/tools/pgindent/typedefs.list