The attached regression test patch (written by Claude Code) shows that a GiST index on a multirange column can fail to return rows during scans that use the contained-by operator.
The multirangetypes test already runs every GiST query twice, once
with a sequential scan and once with the index, and the two must
agree. The added query asks for rows contained in
'{[1,11),[21,31),[41,51)}', which is a value the test table already
contains. The sequential scan returns 501 and the index scan returns
500. The row it loses has a multirange that exactly matches the one
from the query.
The multirange GiST support was added by db6335b5b. This is an issue
on 14 and up.
--
Peter Geoghegan
0001-Add-regression-test-for-multirange-GiST-containment-.patch
Description: Binary data
