Hi, The planner support function for the inet << and <<= operators rewrites the predicate into range clauses of the form
key >= network_scan_first(C) AND key <= network_scan_last(C)
which only works when opfamily is same as network_cmp_internal().
Since be1cc9aaf5b [0] this is actually not checked. [0] commit message
says that
To fix restore the opfamily == NETWORK_BTREE_FAM_OID check inside
match_network_subset.
A regression test with a masklen-ordered btree opclass over inet is
included as a separate patch. This case looks too narrow to spend CI
cycles on, OTOH this is real historical regression.
[0]
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=be1cc9aaf5b79f07bc0483a0c95366c77a844d0a
--
Best regards,
Kirill Reshke
0001-fix-network-subset-support.patch
Description: Binary data
0002-test-network-subset-support.patch
Description: Binary data
