Richard Jones <rich(at)annexia(dot)org> writes:
> select countryid from iptocountry where network >> '1.2.3.4';
> Is there a suitable index that I can put on the network field to fix
> this?
Not at the moment :-(. I think it might be possible to write a GIST
opclass that could handle this, but there's not one there today.
regards, tom lane