Thank you for looking at it.
> In inet_his_inclusion_selec function,
> When the constant matches only the right side of the bucket, and if it’s a last bucket then it's never considered as
partialmatch candidate.
> In my opinion, if it's not a last bucket then for next bucket it will become left boundary and this will be treated
aspartial match so no problem, but in-case of last bucket it can give wrong selectivity.
>
> Can't we consider it as partial bucket match if it is last bucket ?
Actually, in that case, the ratio for one value in the column is used.
I clarified the comment about it. I do not think it is common enough
case to make the function more complicated.
> Apart from that there is one spell check you can correct
> -- in inet_his_inclusion_selec comments
> histogram boundies -> histogram boundaries :)
I fixed it. New version attached. The debug log statements are also
removed.