Attached is a patch that explains to optimizer that its possible to use
index when performing a << b where a is an inet/cidr value and b is a
constant.
Indexpath generated for such an expression is this:
(a > network(b)) and (a <= set_masklen(broadcast(b, 32)))
Since this is my first time delving in the guts of postgres, someone
definitely should review it :)
I mostly based my code on prefix_quals function for string types.
Thanks