Hi Haibo,

Attached is v7 with the changes we discussed.

Patch 2 now has an inline comment on the && case explaining the
outer-bounds approximation and its consistency with existing restriction
selectivity. The commit message mentions it as well.

Patch 3 uses a separate backend-private header (rangetypes_selfuncs.h)
instead of selfuncs.h.

Regards,
Maxime