Fix gist_bool_ops to use gbtreekey2
authorTomas Vondra <tomas.vondra@postgresql.org>
Mon, 8 Nov 2021 00:14:55 +0000 (01:14 +0100)
committerTomas Vondra <tomas.vondra@postgresql.org>
Mon, 8 Nov 2021 00:14:55 +0000 (01:14 +0100)
commite2fbb883720aa222f61eb9f3affad1c63bac7cbb
treea77979a6c39d24fa71ee6f3eda38a4c307f583c6
parentccf289745d3e50360653181dce6a277a1fc79730
Fix gist_bool_ops to use gbtreekey2

Commit 57e3c5160b added a new GiST bool opclass, but it used gbtreekey4
to store the data, which left two bytes undefined, as reported by skink,
our valgrind animal. There was a bit more confusion, because the opclass
also used gbtreekey8 in the definition.

Fix by defining a new gbtreekey2 struct, and using it in all the places.

Discussion: https://postgr.es/m/CAE2gYzyDKJBZngssR84VGZEN=Ux=V9FV23QfPgo+7-yYnKKg4g@mail.gmail.com
contrib/btree_gist/btree_bool.c
contrib/btree_gist/btree_gist--1.6--1.7.sql